Peterson
Aug 30th, 1999, 09:07 PM
Installed MS VB 6.0 recently and my apps containing DBGrids had the "rug put out from under them." Specifically, DBGrids were disabled when opening projects, only OLEDB Datagrid shows on project Components.
At any rate, I can successfully link a table to a new Datagrid using both DAO 3.51 and OLEDB thru ADODC1. However, in the code below
--------------------------------
Dim history1 As Database
Dim qry As String
Dim Mysnap1 As Recordset
ChDir App.Path
Set history1 = Workspaces(0).OpenDatabase("pedigree.mdb", False, False, ";pwd=genetics;")
qry = "SELECT * FROM Patients Order by [idnumber] ASC"
Set Mysnap1 = history1.OpenRecordset(qry, dbOpenDynaset)
Set Data1.Recordset = Mysnap1
--------------------------------------
I can't replace the command:
Data1.Recordset = Mysnap1
with
ADODC1.Recordset = Mysnap1
any way without getting an error. ADODC1 does have a recordset property, but I can't use it without an error. This prevents me from linking the sorted snapshot with Datagrid through ADODC1.
How can I connect the sorted snapshot (Mysnap1) to a Datagrid with ADODC1?
-LP
At any rate, I can successfully link a table to a new Datagrid using both DAO 3.51 and OLEDB thru ADODC1. However, in the code below
--------------------------------
Dim history1 As Database
Dim qry As String
Dim Mysnap1 As Recordset
ChDir App.Path
Set history1 = Workspaces(0).OpenDatabase("pedigree.mdb", False, False, ";pwd=genetics;")
qry = "SELECT * FROM Patients Order by [idnumber] ASC"
Set Mysnap1 = history1.OpenRecordset(qry, dbOpenDynaset)
Set Data1.Recordset = Mysnap1
--------------------------------------
I can't replace the command:
Data1.Recordset = Mysnap1
with
ADODC1.Recordset = Mysnap1
any way without getting an error. ADODC1 does have a recordset property, but I can't use it without an error. This prevents me from linking the sorted snapshot with Datagrid through ADODC1.
How can I connect the sorted snapshot (Mysnap1) to a Datagrid with ADODC1?
-LP