Hi Jerry
I cam to that comclusion because this code used to work,
then I changes the connection provider and version of ado
used now it doesn't work on the recordset.movenext line.
Also it is not failing on the insert because that works.
The vb code is :
Public Function Insert(ByVal intComID As Integer, _
ByVal strDescription As String, _
ByVal lngParentLocationID As Long,
_
ByVal intLocationLevel As Integer,
_
ByVal strCreatedBy As String) As
Long
On Error GoTo ErrorHandler
Dim rstADO As ADODB.Recordset
Dim strSQL As String
strDescription = dbSet.FixQuote(strDescription)
dbSet.BeginTrans
strSQL = "SET NOCOUNT ON; INSERT INTO tStoreLocation"
strSQL = strSQL & "("
strSQL = strSQL & "ComID, Description,
ParentLocationID, LocationLevel, CreatedOn, CreatedBy"
strSQL = strSQL & ") VALUES ("
strSQL = strSQL & intComID
strSQL = strSQL & ", '" & strDescription & "'"
strSQL = strSQL & ", " & lngParentLocationID
strSQL = strSQL & ", " & intLocationLevel
strSQL = strSQL & ", " & GetLogicalGetDate
strSQL = strSQL & ", '" & strCreatedBy & "'"
strSQL = strSQL & ")"
strSQL = strSQL & "; SELECT @@IDENTITY"
Set rstADO = dbSet.OpenView(strSQL)
Insert = rstADO.NextRecordset.Fields(0)
Set rstADO = Nothing
dbSet.Commit
Exit Function
ErrorHandler:
App.LogEvent ErrorControl.LogMessage
("StoreLocation", "Insert")
Set rstADO = Nothing
dbSet.Rollback
Err.Raise Err.Number, Err.Source, Err.Description
End Function
the Connection string is:
Provider=SQLOLEDB.1;Extended
Properties="SERVER=phuhlisa;Database=dev;UID=sa;PWD=";Use
Procedure for Prepare=1;Auto Translate=True;Packet
Size=4096;Workstation ID=SAGIE;Use Encryption for
Data=False;Tag with column collation when possible=False
And as i said th cursorlocation is server.
And when you look at the error raised to vb you get :
Current provider does not support returning multiple
recordsets from a single execution.
So there you go.
S
generates errors
recordsets, how did you
you expect anybody to
trying to do).
there
done.