Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in Access not MS-SQL
Message
From
13/03/2002 02:52:52
Larry Santos
Local Data System
Philippines
 
 
To
All
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Error in Access not MS-SQL
Miscellaneous
Thread ID:
00631929
Message ID:
00631929
Views:
52
Hi,

Any body can help to my code which got an error "Method 'Open' of object '_recordset' failed....


Private Sub Command1_Click()
Dim RS As ADODB.Recordset
Dim strConn As String
Catalog=BackOffice;Data Source=(local)"
Set RS = New ADODB.Recordset
RS.CursorLocation = adUseClient
RS.CursorType = adOpenDynamic
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Toping\Miner\BackOffice.mdb;Persist Security Info=False"
RS.Open "SELECT SaleMaster.STRCDE, SaleMaster.PRTYP, DeptDesc.ITMDESC, " & _
"SaleMaster.SCDE, SaleMaster.COLOR, SaleMaster.SIZE, SaleMaster.SLEDTE, " & _
"SaleMaster.SLQTY, SaleMaster.CSAMT, SaleMaster.CDAMT, SaleMaster.discount, " & _
"SaleMaster.INVNO, SaleMaster.BCODE " & _
"From DeptDesc, SaleMaster " & _
"Where SaleMaster.PRTYP = DeptDesc.PRTYP " & _
"ORDER BY SaleMaster.PRTYP", strConn, adOpenDynamic, adLockPessimistic
Dim rptApp As CRAXDRT.Application
Dim rptReport As CRAXDRT.Report
Dim rptDatabase As CRAXDRT.Database
Set rptApp = New CRAXDRT.Application
Set rptReport = rptApp.OpenReport("C:\MontlhySalesSummarybyDepartment 1.rpt")
rptReport.Database.SetDataSource RS, 3, 1
'rptDatabase.SetDataSource RS, 3, 1 '
CRViewer1.ReportSource = rptReport
CRViewer1.ViewReport
End Sub

NOTE:
if i used my connection to ms-sql theres no error...


TIA
Next
Reply
Map
View

Click here to load this message in the networking platform