|
-
Nov 28th, 2000, 01:07 PM
#1
Thread Starter
New Member
I'm using an ado to connect to a flexgrid but the when I click the DataSource property on the flexgrid it says "No compatible data source found". ANy ideas?
Thanks
-
Nov 28th, 2000, 03:34 PM
#2
Hyperactive Member
Hmm...
From what I understand, if you are using an ADO connection, have you opened a recordset? If you want to do it that way, you would have to set the datasource equal to the recordset after you have opened it. Here's an example:
Code:
rs.Open sSQLSelect, gobjConnect, adOpenStatic, adLockBatchOptimistic, adCmdText
If Not rs.EOF And Not rs.BOF Then
rs.MoveFirst
End If
rs.ActiveConnection = Nothing
Set FlexGrid1.DataSource = rs
sSQLSelect could be a string SQL command, table, or stored procedure. gobjConnect is the name of the connection.
You can read more about this here:
R U a Datagrid(ADO) Pro?
Going Crazy!!!
I hope this helps and Good Luck!
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
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
|