MichaelaLee
Programmer
Hi Everyone.
I'm trying to move a msAccess database to the server and I'm getting the following error from the CRVeiwer:
Logon Failed
Details: ADO Error code: 0X80004005
MSDataShape
Data provider could not be initialized
SQL State: 3024
Native Error: 31
Now, when I connect to the data through the report designer and cr itself, everything seems fine, but when I try to set the locations in code, I get the above error. Here is the code:
Public Sub OpenReport(pReportType As ReportType, Optional FromDate As Date, Optional ToDate As Date)
On Error GoTo Err
Dim cString As String
Dim crxDBTables As CRAXDRT.DatabaseTable
lpReportType = pReportType
cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\MaintainaceTracker1.mdb;Persist Security Info=False"
Select Case pReportType
Case rpPrograms
For Each crxDBTables In crOrdersByProgram1.Database.Tables
crxDBTables.ConnectionProperties("Data Source") = App.Path & "\MaintainaceTracker1.mdb"
crxDBTables.ConnectionProperties("Password") = ""
crxDBTables.ConnectionProperties("User Id") = ""
crxDBTables.ConnectionProperties("Provider") = "Microsoft.Jet.OLEDB.4.0"
Next
CRViewer91.ReportSource = crPrograms
End Select
Screen.MousePointer = vbHourglass
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
Exit Sub
Err:
MsgBox Err.Description
End Sub
I've tried many things that I've found online and in the manuals, but still having the problem. There is no password set for this database, so not sure whats going on. In run mode I have the following setting in the report.
Data Source = C:\Projects\MaintainaceTracker\MaintainaceTracker.mdb
Provider = MSDataShape
after I change the settings, I get
Data Source = C:\Projects\MaintainaceTracker\MaintainaceTracker1.mdb
Provider = Microsoft.Jet.OLEDB.4.0
Can someone please give me a hand. Thank you.
Michael Lee
I'm trying to move a msAccess database to the server and I'm getting the following error from the CRVeiwer:
Logon Failed
Details: ADO Error code: 0X80004005
MSDataShape
Data provider could not be initialized
SQL State: 3024
Native Error: 31
Now, when I connect to the data through the report designer and cr itself, everything seems fine, but when I try to set the locations in code, I get the above error. Here is the code:
Public Sub OpenReport(pReportType As ReportType, Optional FromDate As Date, Optional ToDate As Date)
On Error GoTo Err
Dim cString As String
Dim crxDBTables As CRAXDRT.DatabaseTable
lpReportType = pReportType
cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\MaintainaceTracker1.mdb;Persist Security Info=False"
Select Case pReportType
Case rpPrograms
For Each crxDBTables In crOrdersByProgram1.Database.Tables
crxDBTables.ConnectionProperties("Data Source") = App.Path & "\MaintainaceTracker1.mdb"
crxDBTables.ConnectionProperties("Password") = ""
crxDBTables.ConnectionProperties("User Id") = ""
crxDBTables.ConnectionProperties("Provider") = "Microsoft.Jet.OLEDB.4.0"
Next
CRViewer91.ReportSource = crPrograms
End Select
Screen.MousePointer = vbHourglass
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
Exit Sub
Err:
MsgBox Err.Description
End Sub
I've tried many things that I've found online and in the manuals, but still having the problem. There is no password set for this database, so not sure whats going on. In run mode I have the following setting in the report.
Data Source = C:\Projects\MaintainaceTracker\MaintainaceTracker.mdb
Provider = MSDataShape
after I change the settings, I get
Data Source = C:\Projects\MaintainaceTracker\MaintainaceTracker1.mdb
Provider = Microsoft.Jet.OLEDB.4.0
Can someone please give me a hand. Thank you.
Michael Lee