Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 2005 SQL 2005 and SQL CE 2005

Status
Not open for further replies.

joejack0330

Technical User
Jan 27, 2006
95
US
We have some Win CE devices that we use and want to be able to keep a local sql ce database on the ce device to collect data then when ready to send data to our sql 2005 database without using rda or merging. We like to keep it simple and just make an sqlcedatareader connection for ce db and an sqldatareader for the sql 2005 db. We have it working with both connections but want to know if we can do an insert into sql 2005 table with a select from the ce table or even do our select from the ce table first to get data into datareader then do the insert from datareader in one batch? Or would we have to loop through and insert a record at a time? We're not talking about a lot of data so looping is not an issue but would prefer a batch update.

Thanks, Joe
 
If you have the data in one table, and want to select INTO another table then you can do that.

insert into myTable
select * from myTable

This requires that you have a handle on the table. You may want to try passing in a temp table loaded up, then just run the insert there.

David

-Sometimes the answer to your question is the hack that works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top