Monday, March 26, 2012
Receipt with copies
Thanks...Which database are you using?
You can have stored procedure having the query
Select query
Union All
Select query
Union All
Select query
and design the report using that stored procedure
Friday, March 23, 2012
Rebuilding Full Text Catalog
I have created a db install app that will install all datatables,
build full-text catalogs and add job scheduler to populate the
catalogs several times a day.
However, I would also like my catalogs to be rebuilt every midnight
and repopulated again. I know of Rebuild method and Start method but
how do I schedule it so it is rebuilt every midnight?
Thank you,
_dino_
Why do you want to do a rebuild? A full population should suffice.
To schedule a rebuild you would schedule sp_fulltext_catalog
'catalogname','rebuild'
Have this job run in the database you are full-text indexing.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Dino Buljubasic" <dino@.noplacelikehome.com> wrote in message
news:929nf11uhqac6ajetilqje30crccvjqast@.4ax.com...
> Hi,
> I have created a db install app that will install all datatables,
> build full-text catalogs and add job scheduler to populate the
> catalogs several times a day.
> However, I would also like my catalogs to be rebuilt every midnight
> and repopulated again. I know of Rebuild method and Start method but
> how do I schedule it so it is rebuilt every midnight?
> Thank you,
> _dino_
Monday, February 20, 2012
readxml doesnt work :(
i'm working on a project for pocket pc, which is an app that registers customers, suppliers, stocks and orders. all this is stored in the ppc itself using the SQL CE server.
i'm programming with VS2005, which is great, the tableadapters make the work lot easier.
i'm just having some problems importing and exporting data from the sql tables to files.
the export function works quiet well, i just load the data from the tableadapter into a table and then use the WriteXml(file) function.
Now, for importing I do more or less the same thing:
DataSetrTableAdapters.Customers cta = new ... etc etc
DataSetr.CustomersDataTable cdt = new DataSetr.CustomersDataTable();
cdt.ReadXml("\\My Documents\\customers.xml");
cta.Update(cdt);
result: empty table! :(
i also tried adding cta.Fill(cdt) before the update, but the result is the same....
any suggestions?
thank you very much
Hi,
The problem is that WriteXml writes the entire state of the dataset, including row state (added, modified, unchanged, etc.). When you call Fill, you add all rows to the DataSet from the table and Fill will automatically call AcceptChanges to mark all the rows as unmodified. So when you read it back from the file and call Update nothing happens - that's because the data-adapter doesn't see any row that needs processing.
I'm not sure what you're trying to achieve when reading from a file. Do you expect that those rows are *added* to the database, or you expect something more like a "merge" operation between the contents of the file and the contents of the database?
If you want to add the rows, then you have to options:
1) Avoid calling AcceptChanges on Fill. There is a property in the adapter called AcceptChangesDuringFill that you can use for that.
2) Alternatively, after loading the file into a DataSet, you can iterate over the rows and call SetAdded() on each row.
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corporation
|||i've been searching for this problem , but every page i read its about datasets.
i'n not using datasets, but datatables. the readxml is in the datatable class, not dataset. did you notice?
i want to import data to the sql server, and wipe out everything that is there. so i'll probably clean all the tables first, if necessary. after that i read from the xml and save everything again to the tables.
|||
Hi,
Actually, everything I mentioned applies to DataTable as well, including both approaches to ensure that the rows are marked as added.
If your goals is to wipe the table in the database and import the contents of the file, then you can simply first clean up the table and then use any of the options I mentioned in the previous post.
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corporation
I have the same problem.
I have a dataset, I want to fill one table in the dataset using the xml data and other table is filled by the adapter from DB. Actually the DataTable.ReadXml(filename) is not working. Am I missing anything in the XML data file. Pablo, Can you give me an example. Thanks.
Steven
readxml doesnt work :(
i'm working on a project for pocket pc, which is an app that registers customers, suppliers, stocks and orders. all this is stored in the ppc itself using the SQL CE server.
i'm programming with VS2005, which is great, the tableadapters make the work lot easier.
i'm just having some problems importing and exporting data from the sql tables to files.
the export function works quiet well, i just load the data from the tableadapter into a table and then use the WriteXml(file) function.
Now, for importing I do more or less the same thing:
DataSetrTableAdapters.Customers cta = new ... etc etc
DataSetr.CustomersDataTable cdt = new DataSetr.CustomersDataTable();
cdt.ReadXml("\\My Documents\\customers.xml");
cta.Update(cdt);
result: empty table! :(
i also tried adding cta.Fill(cdt) before the update, but the result is the same....
any suggestions?
thank you very much
Hi,
The problem is that WriteXml writes the entire state of the dataset, including row state (added, modified, unchanged, etc.). When you call Fill, you add all rows to the DataSet from the table and Fill will automatically call AcceptChanges to mark all the rows as unmodified. So when you read it back from the file and call Update nothing happens - that's because the data-adapter doesn't see any row that needs processing.
I'm not sure what you're trying to achieve when reading from a file. Do you expect that those rows are *added* to the database, or you expect something more like a "merge" operation between the contents of the file and the contents of the database?
If you want to add the rows, then you have to options:
1) Avoid calling AcceptChanges on Fill. There is a property in the adapter called AcceptChangesDuringFill that you can use for that.
2) Alternatively, after loading the file into a DataSet, you can iterate over the rows and call SetAdded() on each row.
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corporation
|||i've been searching for this problem , but every page i read its about datasets.
i'n not using datasets, but datatables. the readxml is in the datatable class, not dataset. did you notice?
i want to import data to the sql server, and wipe out everything that is there. so i'll probably clean all the tables first, if necessary. after that i read from the xml and save everything again to the tables.
|||
Hi,
Actually, everything I mentioned applies to DataTable as well, including both approaches to ensure that the rows are marked as added.
If your goals is to wipe the table in the database and import the contents of the file, then you can simply first clean up the table and then use any of the options I mentioned in the previous post.
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corporation
I have the same problem.
I have a dataset, I want to fill one table in the dataset using the xml data and other table is filled by the adapter from DB. Actually the DataTable.ReadXml(filename) is not working. Am I missing anything in the XML data file. Pablo, Can you give me an example. Thanks.
Steven