Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to buffer then insert a varying set of data

Author  Topic 

TexasAggie
Starting Member

9 Posts

Posted - 2012-11-06 : 11:00:27
I do parameterized inserts at 1Hz and I'd rather buffer for 60 seconds on the local machine and then pump the data to the server. This would be easy if my data sets were always in the exact same format, but because I am running data acquisition equipment and the channel lists always change, my insert statements must be flexible.

Unfortunately, I haven't the slightest clue of how to do this. I'd like to keep my parameterized statements in tact. I just don't know where to store the data and then how to pump it to the server. I guess I don't know anything!

I could store it in a datatable if I knew how to insert into a datatable, but then I'd have to figure out how to insert the 60 rows of the datatable into the database when the column lists are not identical. A local file with a bulk insert is also possible.

Any ideas?

Thanks.

Ifor
Aged Yak Warrior

700 Posts

Posted - 2012-11-06 : 12:18:56
I am not sure what you are doing, but the following article, on streaming data to the db from .Net, may help:

http://www.sqlservercentral.com/articles/SQL+Server+2008/66554/
Go to Top of Page
   

- Advertisement -