Hi,
We are converting our application to use to OLEDB from ADODB. The application is written in VB 2005 and storing data in Access tables. Our problem is after writing the code and started unit testing we notice a big hit in performance. Below is a snippet of our code:
START OF CODE -------
strSQL = "INSERT INTO SPH(" & _
"[TGSN], " & _
.
.
"VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," & _
.
.
Using cmd As New OleDbCommand(strSQL, cnnNew)
cmd.Parameters.AddWithValue("TGSN", Downloaded_Rec_SPH.tgsn)
If arrSPH_Weeks_Detail(0).Trks_In_Svc = "99999" Then
cmd.Parameters.AddWithValue("TRKS_IN_SVC_1", " ")
Else
cmd.Parameters.AddWithValue("TRKS_IN_SVC_1", arrSPH_Weeks_Detail(0).Trks_In_Svc)
End If
.
.
.
cmd.ExecuteNonQuery()
End Using
END OF CODE -----------
This table has approxiatley 182 fields, we have 22,000 records and it took 9 mintues. Using ADODB the same number of records it took 3 minutes.
If someone could provide some guidance on this it would greatly be appreciated.
We are converting our application to use to OLEDB from ADODB. The application is written in VB 2005 and storing data in Access tables. Our problem is after writing the code and started unit testing we notice a big hit in performance. Below is a snippet of our code:
START OF CODE -------
strSQL = "INSERT INTO SPH(" & _
"[TGSN], " & _
.
.
"VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," & _
.
.
Using cmd As New OleDbCommand(strSQL, cnnNew)
cmd.Parameters.AddWithValue("TGSN", Downloaded_Rec_SPH.tgsn)
If arrSPH_Weeks_Detail(0).Trks_In_Svc = "99999" Then
cmd.Parameters.AddWithValue("TRKS_IN_SVC_1", " ")
Else
cmd.Parameters.AddWithValue("TRKS_IN_SVC_1", arrSPH_Weeks_Detail(0).Trks_In_Svc)
End If
.
.
.
cmd.ExecuteNonQuery()
End Using
END OF CODE -----------
This table has approxiatley 182 fields, we have 22,000 records and it took 9 mintues. Using ADODB the same number of records it took 3 minutes.
If someone could provide some guidance on this it would greatly be appreciated.