
VB6 Data Report designer CHECK MY CODING??
Hi mates,
.
I am using VB6 data report designer in design time. Means i am
manually assigning the data format property and datasource property to a
Data Environment and it works perfect. But when i try to link it to a ADO
object by my code it brings error message like "Data field ("Empty") not
found"
My code is as following:
'Private Sub Command1_Click()
' Dim Myrpts As MyDatareport
' Dim cnn As Connection
' Dim rst As Recordset
' Set cnn = New Connection
' Set rst = New Recordset
' cnn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security
Info=False;Data Source=c:\abdul\database\cars97.mdb"
' rst.Open "select * from tblcars", cnn, adOpenForwardOnly,
adLockPessimistic
'
' Set Myrpts = New MyDatareport
' Set Myrpts.DataSource = rst
'
' Myrpts.Show
'
'End Sub
So first of all i want to know whether i can use it with ADO and if so how.
Thanks from your cooperation in advance.
Abdul