IxiRancid Posted February 24, 2006 Posted February 24, 2006 I know that a connection with two different DataReaders cannot exist at the same time. I'm doing this: 1. reading from a table and replicating these same rows 2. then these replicated rows should have Updated linked columns (IDfak - not the pirmary ID though!) pseudocode: connection open Reader1 SELECT statement (Command1) While read add parameters from Reader1 to Command2, except IDfakt (new value) Command2 INSERT (replicate) these rows - executenonquery End While connection close Is there another way to do this. I attached a TXT file with the code snip.code1.txt Quote
IxiRancid Posted February 24, 2006 Author Posted February 24, 2006 OK ok... problem solved. This was it, if you cehck the TXT file: ... While drPOSTAVKE.Read cmdPostavka = New OleDbCommand(strINSERT, myConnPostavke) s_IDopisa = drPOSTAVKE(2) ... just initialize the Command again. Thanks anyway. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.