Hi, all experts here,
Thank you for your kind attention.
I have encountered a very strange problem with my code doing the loop which I just dont know what is going wrong with it.
Please see the code below:
While (myReader.Read())
if (condition) then
i = i + 1
MsgBox(i)
MsgBox("The" & "" & i & " package is" & "" & myReader.GetString(0))
Opkg.LoadFromSQLServer("servername", "username", "password", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", myReader.GetString(0))
Opkg.SaveToSQLServer("newservername", "username", "password", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", myReader.GetString(0))
end if
The strange thing about it is : The loop work fine and displays me the results I wanted but if I add the two code lines as seen highlighted in red then it did not loop to the end which ended after the first iteration?
Can anyone give me any ideas what is going wrong with that? Why the two code lines there caused that problem?
I am looking forward to hearing from you and thanks a lot for your kind help .
Best regards,
Yours sincerely,
Thank you for your kind attention.
I have encountered a very strange problem with my code doing the loop which I just dont know what is going wrong with it.
Please see the code below:
While (myReader.Read())
if (condition) then
i = i + 1
MsgBox(i)
MsgBox("The" & "" & i & " package is" & "" & myReader.GetString(0))
Opkg.LoadFromSQLServer("servername", "username", "password", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", myReader.GetString(0))
Opkg.SaveToSQLServer("newservername", "username", "password", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", myReader.GetString(0))
end if
The strange thing about it is : The loop work fine and displays me the results I wanted but if I add the two code lines as seen highlighted in red then it did not loop to the end which ended after the first iteration?
Can anyone give me any ideas what is going wrong with that? Why the two code lines there caused that problem?
I am looking forward to hearing from you and thanks a lot for your kind help .
Best regards,
Yours sincerely,