|
-
Sep 22nd, 2000, 10:03 AM
#1
Thread Starter
Addicted Member
Howdy:
I have an ADO connection to an ACCESS97 db using a data control (the connection is fine)
I am trying to attach the datasource property of a MSFlexGrid to the data control.
I get the error:
"No compatable data source was found for this control. Please add an intrinsic Data Control. "
What am I missing? A Reference, a different Data Control?
Help!
Thanx
-
Sep 22nd, 2000, 10:25 AM
#2
_______
<?>
a different Data Control seems logical unless you are
coding the datacontrol and setting and resetting it's
source and fields in seperate parts of your code.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 22nd, 2000, 10:26 AM
#3
Frenzied Member
Make sure your using the ADO data control and not the DAO data control.
The control available in the default toolbox window for a new project is the DAO control.
BTW- If you are doing any serious programming, learn ADO without the data control. The data control is not something you will find in any professionally developed program. Binding controls to data with a datacontrol is not very flexable and ADO's object model is very easy to learn.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Sep 22nd, 2000, 10:31 AM
#4
Thread Starter
Addicted Member
I am using ADO Controls. I know how to use ADO throgh code.
This also errors out:
Set db = New Connection
db.CursorLocation = adUseClient
dbname = "Provider=Microsoft.Jet.OLEDB.4.0;
DataSource=C:\VB98\Nwind.mdb;Persist Security Info=False"
db.Open dbname
Set adoprimaryrs = New Recordset
adoprimaryrs.Open "Select * from Customers", db, adOpenStatic, adLockOptimistic
Set grid.DataSource = adoprimaryrs
The grid is a flexgrid.
Help!
-
Sep 22nd, 2000, 11:35 AM
#5
You have to use MSHFlexGrid instead.
Code:
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Program Files\VB98\NWIND.MDB"
rs.Open "Select * From Customers", cn, adOpenStatic
Set MSHFlexGrid1.DataSource = rs
End Sub
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
|