-
May 28th, 2006, 08:05 AM
#1
The rowset is not bookmarkable
Hi...
I tried to connect to a mySQL database using adodc and displayed the result set using datagrid and it worked.
But this one doesn't. Can anyone please explain to me why the result set isn't bookmarkable? Thanks..
Here's my source code.
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=pos;UID=root;PWD=;"
conn.Open
rs.open "select * from users", conn
set datagrid1.datasource = rs
-
May 29th, 2006, 06:56 AM
#2
Re: The rowset is not bookmarkable
Code:
On Error GoTo ErrorHandler
Dim strSQL As String
Dim lngTmpCustID As Long
lngTmpCustID = CLng(frmMain.txtcust_id.Text)
strSQL = "SELECT Customers.cust_id,Customers.field1, Calls.operator, Calls.call_date, Calls.call_time, " _
& " Calls.call_result FROM Customers INNER JOIN Calls ON Customers.cust_id = " _
& " Calls.cust_id AND Customers.batch_id = Calls.batch_id " _
& " WHERE Customers.batch_id=" & intContactedBatchId & " AND " _
& " Customers.cust_id=" & lngTmpCustID & ""
With rsDenMilise
.CursorLocation = adUseClient
Call .Open(strSQL, CSTR_CONNECTION, adOpenDynamic, adLockOptimistic)
Set dgDenMilisa.DataSource = rsDenMilise
dgDenMilisa.Columns(0).Caption = "Test0"
dgDenMilisa.Columns(1).Caption = "Test1"
dgDenMilisa.Columns(2).Caption = "Test2"
dgDenMilisa.Columns(3).Caption = "Test3"
dgDenMilisa.Columns(4).Caption = "Test4"
dgDenMilisa.Columns(5).Caption = "Test5"
End With
ErrorHandler:
If Err <> 0 Then
Call LogError(Err, "frmSpecificDetails.SetDataToGridDenMilise")
Else
Exit Sub
End If
End Sub
the bold code is your error!
try it.
Regards
VPlag
Good Luck
-------------------*-------------------*------------------------
Today we will see how we can develop:
Ingredients:
Espresso, cigarettes and lounge music
-----------------------------------------------------------------
Please remember to rate the posts and threads that you find useful
-
May 29th, 2006, 12:39 PM
#3
Re: The rowset is not bookmarkable
Thanks!
This is what I get for not programming in VB for 8 months hehe.
-
May 30th, 2006, 12:50 AM
#4
Re: The rowset is not bookmarkable
happy that it helped u
Regards
VPlag
Good Luck
-------------------*-------------------*------------------------
Today we will see how we can develop:
Ingredients:
Espresso, cigarettes and lounge music
-----------------------------------------------------------------
Please remember to rate the posts and threads that you find useful
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|