Hello sirs,
i want to run join query in Crystal report 9 in vb6.
it gives error as not supported
Details:DAO error code:0xbf5
Source:DAO.Database
Description:too few parameters, expected 6
below is my code:-
vb
rs.Open "SELECT S.Scope, S.RF, S.RevisionNo, P.[Date], P.Scope, P.ItemName, P.ItemCode, P.QtyInStock, P.QtyOrdered, " & _
"P.Remark FROM ScopeMaster S, ProductItem P " & _
"WHERE S.Scope=P.Scope AND P.Scope = '" & frmPurchaseReport.cmbScope.Text & "'" & _
"AND P.Date = #" & frmPurchaseReport.dtpRDate.Value & "#", cn, adOpenDynamic, adLockOptimistic, adCmdText
For i = 1 To Report.Database.Tables.Count
Report.Database.Tables(i).SetDataSource (App.Path & "\DB\WinStock.mdb")
Report.Database.Tables(i).Location = App.Path & "\DB\WinStock.mdb"
Report.Database.Tables(i).SetLogOnInfo "", App.Path & "\DB\WinStock.mdb", "Admin", "becool"
Next i
Report.SQLQueryString = "SELECT S.Scope, S.RF, S.RevisionNo, P.[Date], P.Scope, P.ItemName, P.ItemCode, P.QtyInStock, P.QtyOrdered,P.Remark FROM ScopeMaster S, ProductItem P WHERE S.Scope=P.Scope AND P.Scope= '" & frmPurchaseReport.cmbScope.Text & "' AND P.Date = #" & frmPurchaseReport.dtpRDate.Value & "#" ', cn, adOpenDynamic, adLockOptimistic, adCmdText
Report.Database.SetDataSource rs
CRViewer91.ReportSource = Report
CRViewer91.ViewReport
pls help me
Mod edit: Please
Thanks, gabehabe