Hi. I am having a really hard time with this code trying to loop through a datareader, and then enter the data into another table. The logic is that I get 2 columns path and document_no from an Oracle Database. I then need to check if the file in the path column is a valid path. If it is not valid, it should be inserted into a SQL Server 2005 database. My code is below, can anyone help? I'm getting a headache from it. If any further info is needed just let me know. Thanks.
Do While oraReader.Read()
path1 = oraReader("Path")
docno = oraReader("Document_No")
If (System.IO.File.Exists(path1)) Then
sqlCmd = New SqlCommand("INSERT INTO CHECKLINKS1 (DOCUMENT_NO) VALUES (@doc)", conn)
View Complete Post