Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone who can tel me why: The rowset is not bookmarable?

Status
Not open for further replies.
May 22, 2002
6
0
0
NO
Hello,

Anyone out there who can tell me why I get the run-time error '7004': "The rowset is not bookmarable" when I am running this programcode?

The wole thing stops when the program attemting to put the data out in the dataGrid dgrTest.

Option Explicit
Private objConn As ADODB.Connection
Private mrsProdName As New Recordset
Const tmpProdNo = 33037



Private Sub OpenConnection()
Set objConn = New ADODB.Connection
objConn.ConnectionString = "PROVIDER=MSDASQL;DSN=Testdsn;UID=sa;Password=test;"
objConn.Open
End Sub



Private Sub cmdGetData_Click()
GetInfo
End Sub



Private Sub Form_Load()
'OpenConnection
End Sub



Private Sub GetInfo()
Dim strSQL As String
strSQL = "SELECT ProdNo, ProdName, AltProdno, ProdGroup " _
& "From dekl_MovexProd " _
& "Where ProdNo = " & tmpProdNo
OpenConnection
mrsProdName.Open strSQL, objConn
Set dgrTest.DataSource = mrsProdName
End Sub



Private Sub CloseConnection()
If Not (mrsProdName Is Nothing) Then
Set mrsProdName = Nothing
End If
If Not (objConn Is Nothing) Then
objConn.Close
Set objConn = Nothing
End If
End Sub



Private Sub Form_Unload(Cancel As Integer)
CloseConnection
End Sub

Best regard LearningVB (or still LearningVB)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top