First, I can use following code (Visual Basic 6) to connect my database. It work well.
But after I set the Database Password, I can't use this code anymore.
When I run program, it show run time error '20997' ( I can not read the description ).
I don't know how can I set Database Password to connect the database
If anyone know, Please tell me.
Thank you so much for your help.
Here's my code :
With CrystalReport
.ReportFileName = App.Path & "MyReport.rpt"
.Connect = App.Path & "MyDB.dbf"
.SQLQuery = "SELECT * FROM MyTable ORDER BY A,B,C"
.SelectionFormula = "{MyTable.Selected} = YES"
.Action = 1
End With