MontyBurns
Programmer
Hi,
I've got the following VB6 code which calls a DLL and returns an ADODB.Recordset. I need to get it to work in an Access 97 DB but can't figure out what I have to do.
Private Sub cmdGetuserInfo_Click()
Dim CCPM As CCPnMObjects.CCPnM
Dim rs As ADODB.Recordset
Dim NTUserID As String
'On Error GoTo err_handler
Set CCPM = CreateObject("CCPnMObjects.CCPnM"
Set rs = CreateObject("adodb.Recordset"
NTUserID = Me.txtUID
CCPM.BindingString = Me.txtBindingString.Text
Set rs = CCPM.getUserInfo(NTUserID)
If Not rs.EOF Then
Me.txtFName = rs("Firstname"
Me.txtSurname = rs("Lastname"
Me.txtPArea = rs("PracticeArea"
Me.txtJobTitle = rs("JobTitle"
Me.txtLocation1 = rs("Location1"
Me.txtLocation2 = rs("location2"
Me.txtEmail = rs("Email"
Me.txtRole = rs("Role"
End If
Set rs = Nothing
Set CCPM = Nothing
Exit Sub
err_handler:
MsgBox Err.Number & " - " & Err.Description
End Sub
I've added a reference to the DLL, but am getting errors with the ADODB.Recordset part. What exactly should I be doing?
Any help much appreciated,
Burns
I've got the following VB6 code which calls a DLL and returns an ADODB.Recordset. I need to get it to work in an Access 97 DB but can't figure out what I have to do.
Private Sub cmdGetuserInfo_Click()
Dim CCPM As CCPnMObjects.CCPnM
Dim rs As ADODB.Recordset
Dim NTUserID As String
'On Error GoTo err_handler
Set CCPM = CreateObject("CCPnMObjects.CCPnM"
Set rs = CreateObject("adodb.Recordset"
NTUserID = Me.txtUID
CCPM.BindingString = Me.txtBindingString.Text
Set rs = CCPM.getUserInfo(NTUserID)
If Not rs.EOF Then
Me.txtFName = rs("Firstname"
Me.txtSurname = rs("Lastname"
Me.txtPArea = rs("PracticeArea"
Me.txtJobTitle = rs("JobTitle"
Me.txtLocation1 = rs("Location1"
Me.txtLocation2 = rs("location2"
Me.txtEmail = rs("Email"
Me.txtRole = rs("Role"
End If
Set rs = Nothing
Set CCPM = Nothing
Exit Sub
err_handler:
MsgBox Err.Number & " - " & Err.Description
End Sub
I've added a reference to the DLL, but am getting errors with the ADODB.Recordset part. What exactly should I be doing?
Any help much appreciated,
Burns