Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting VB.Net with MAS90

Status
Not open for further replies.

Trusts

Programmer
Feb 23, 2005
268
0
0
US
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!
 
Don't use the datareader. With a datareader you only read one record at a time, forcing you to go back to MAS90 ... well 7000 times!!! Try the DataAdapter / DataSet approach. Worked for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top