SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to buffer then insert a varying set of data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

TexasAggie
Starting Member

USA
9 Posts

Posted - 11/06/2012 :  11:00:27  Show Profile  Reply with Quote
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

574 Posts

Posted - 11/06/2012 :  12:18:56  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000