Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...