-
Apr 25th, 2012, 04:08 AM
#1
Thread Starter
New Member
crystal report connect error with password
Hi guys ,
this code is using to open crystal report from VB6 with database MSAccess but the problem is if there a password for the database this code will not working
can anyone help me to correct to used it with password database
Private Sub CmdPrn_Click()
ServerSetup1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & LocationFile & "\PSCData.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False;;Jet OLEDBatabase Password=Mi40;"
rpt1 = LocationFile & "\RptTrans.rpt"
With MDIMain.CrystalReport1
.ReportFileName = rpt1
.Connect = ServerSetup1
.DiscardSavedData = True
.RetrieveDataFiles
.ReportSource = 0
.Destination = crptToWindow
.PrintFileType = crptCrystal
.WindowState = crptMaximized
.WindowMaxButton = False
.WindowMinButton = False
.SelectionFormula = "{Trans.ProNum} ='" & TxtCaseNum.Text & "'"
.Action = 1
End With
End sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|