Hello
I am developing an application in Visual Basic 6. I am using a data grid. Having a problem in adding the data to the grid.
Entering the code:-
Dim qry, src, cr As String
'generating Connection
qry = "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & App.path & "\flying0.m db;" _
& "Persist Security Info=False"
'qry = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\ddd\w tndata.mdb;Pers ist Security Info=False"
Set con = New ADODB.Connectio n
con.ConnectionS tring = qry
con.Open
cr = Trim(frmsrch.tx tcourse.Text)
src = "select * from " & Trim(frmsrch.cm bcountry.Text) & " where Courses= '" & cr & "' "
Set rs = New ADODB.Recordset
rs.Open src, con, adOpenDynamic, adLockOptimisti c
'Set DBGrid2 = New
Set DBGrid2.DataSou rce = rs.Fields >>>>Getting Error at this point.
DBGrid2.Refresh
The error is 403. Class does not support Automation or does not support expected interface.
Plz. Its urgent. Have to submit project by Tomorrow.
Thnaks & Regards
Homs
I am developing an application in Visual Basic 6. I am using a data grid. Having a problem in adding the data to the grid.
Entering the code:-
Dim qry, src, cr As String
'generating Connection
qry = "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & App.path & "\flying0.m db;" _
& "Persist Security Info=False"
'qry = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\ddd\w tndata.mdb;Pers ist Security Info=False"
Set con = New ADODB.Connectio n
con.ConnectionS tring = qry
con.Open
cr = Trim(frmsrch.tx tcourse.Text)
src = "select * from " & Trim(frmsrch.cm bcountry.Text) & " where Courses= '" & cr & "' "
Set rs = New ADODB.Recordset
rs.Open src, con, adOpenDynamic, adLockOptimisti c
'Set DBGrid2 = New
Set DBGrid2.DataSou rce = rs.Fields >>>>Getting Error at this point.
DBGrid2.Refresh
The error is 403. Class does not support Automation or does not support expected interface.
Plz. Its urgent. Have to submit project by Tomorrow.
Thnaks & Regards
Homs