Hi guys,
In a datasheet, on the delete event procedure I have the code below:
Static StrConn As String
Static rec As New ADODB.Recordset
Static cmd As New ADODB.Command
StrConn = "Driver={SQL Server};Server=xxx;Database=db;Trusted_Connection=Yes;"
cmd.ActiveConnection = StrConn
cmd.CommandText = "InsertIntoDailyProgramArchive " + CStr(Me.AutoAA) + "," + GetCurUser()
Set rec = cmd.Execute
The problem is that when I delete one record the store procedure is running great. When I choose to delete more than one row becomes the error below
Run-time error ‘-2147217871 (80040e31)’
[Microsoft][ODBC SQL Server Driver]Timeout expired
A message box appears which says debug – end. I click on debug and the error is appearing on Set rec = cmd.Execute. When I click to end it is deleting only the first row. I cannot figure out the cause of the problem…
In a datasheet, on the delete event procedure I have the code below:
Static StrConn As String
Static rec As New ADODB.Recordset
Static cmd As New ADODB.Command
StrConn = "Driver={SQL Server};Server=xxx;Database=db;Trusted_Connection=Yes;"
cmd.ActiveConnection = StrConn
cmd.CommandText = "InsertIntoDailyProgramArchive " + CStr(Me.AutoAA) + "," + GetCurUser()
Set rec = cmd.Execute
The problem is that when I delete one record the store procedure is running great. When I choose to delete more than one row becomes the error below
Run-time error ‘-2147217871 (80040e31)’
[Microsoft][ODBC SQL Server Driver]Timeout expired
A message box appears which says debug – end. I click on debug and the error is appearing on Set rec = cmd.Execute. When I click to end it is deleting only the first row. I cannot figure out the cause of the problem…