psycoperl
Active Member
- Joined
- Oct 23, 2007
- Messages
- 339
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
- Web
I am getting SID passed to my subroutine. [According to Debug.Print TypeName(SID) it is datatype long]
In my test I am using SID values of 130 and 131
I know that there is data in the table that will return a single row.
I even tested the query in Access using and got the row.
I had even hard coded the value into the ts.Open statement and it does not show the row it executes the if ts.bof=ts.eof line which stops processing the subroutine.
In the table tsTestSessionID is an autonumber.
Can not figure out what is going on as every other test it works.
In my test I am using SID values of 130 and 131
I know that there is data in the table that will return a single row.
I even tested the query in Access using and got the row.
I had even hard coded the value into the ts.Open statement and it does not show the row it executes the if ts.bof=ts.eof line which stops processing the subroutine.
In the table tsTestSessionID is an autonumber.
Can not figure out what is going on as every other test it works.
Code:
Dim ts As ADODB.Recordset
Set ts = New ADODB.Recordset
ts.ActiveConnection = CurrentProject.Connection
ts.LockType = adLockReadOnly
ts.CursorType = adOpenDynamic
ts.Open "Select * from tblTestSessions Where tsTestSessionID =" & SID
If Not CK.BOF Then
ts.MoveFirst
End If
If ts.BOF = ts.EOF Then
MsgBox "Test Session Not Found, Processing Stop", vbCritical, "Error!"
ts.Close
Set ts = Nothing
Exit Sub
End If
ts.Close
Set ts = Nothing