Hi All,
I am using the ODBCOnnection object. Here is a snippet of code to get the idea...
If (dbConn Is Nothing) Then
Try
dbConn = New OdbcConnection(dbConnStr)
dbConn.ConnectionTimeout = timeout
dbConn.Open()
myForm1.TextBox1.Text = "Connected...."
'Dim myCommand As New OdbcCommand(ssql, dbConn)
Dim myCommand As New OdbcCommand
myCommand.Connection = dbConn
Dim myReader As OdbcDataReader
myCommand.CommandText = "Select CustomerNumber, InvoiceNumber, InvoiceType From AR4_OPenInvoice" ' Where InvoiceNumber='" & xcl_array(loop1) & "'"
myReader = myCommand.ExecuteReader
This works but I have two issues. This might be slow (but I'm not sure since I have nothing else to compare it to).
The second issue is that it hangs after reading about 7000 records. Now, I am not sure that using the Reader object is the best thing either, so any advice and examples are great.
The other thing I am wondering is whether there is another way to do this...ADO for example.
Thanks!
I am using the ODBCOnnection object. Here is a snippet of code to get the idea...
If (dbConn Is Nothing) Then
Try
dbConn = New OdbcConnection(dbConnStr)
dbConn.ConnectionTimeout = timeout
dbConn.Open()
myForm1.TextBox1.Text = "Connected...."
'Dim myCommand As New OdbcCommand(ssql, dbConn)
Dim myCommand As New OdbcCommand
myCommand.Connection = dbConn
Dim myReader As OdbcDataReader
myCommand.CommandText = "Select CustomerNumber, InvoiceNumber, InvoiceType From AR4_OPenInvoice" ' Where InvoiceNumber='" & xcl_array(loop1) & "'"
myReader = myCommand.ExecuteReader
This works but I have two issues. This might be slow (but I'm not sure since I have nothing else to compare it to).
The second issue is that it hangs after reading about 7000 records. Now, I am not sure that using the Reader object is the best thing either, so any advice and examples are great.
The other thing I am wondering is whether there is another way to do this...ADO for example.
Thanks!