VB5, Crystal 4.6.1 -User Level Security password 
Author Message
 VB5, Crystal 4.6.1 -User Level Security password

Hey, can anybody help me with this?  I created a big VB 5.0
application on JET 3.5 database, for my client.  It has a number of
complicated Crystal Reports 4.6.1 which I am running with the Crystal
Reports control on a form, like this:

sCRWSelection = "{VeriFoneReports.VeriReportDate} = etc etc long...
rptCRW.SelectionFormula = sCRWSelection
rptCRW.DataFiles(0) = psDBPath_Filename
rptCRW.ReportFileName = (App.Path + "\Cashiers.rpt")
rptCRW.PrintFileName = (App.Path + "\GL.prn")
rptCRW.Destination = 0
rptCRW.Action = 1

Worked beautiful, until they required User Level Security-- now the
reports all return "Run-time error 20533, Unable to Open Database."

I have been utterly unable to tweak these reports in  any way to
enable them to access the database:  the .UserName and .Password
properties have no effect.

Will I need to create temporary unprotected MDB files, to print
Crystal Reports from a secure database?  I can't believe this....

My security file is C:\...\MyFile.MDW
(not C:\WinNT\System32\SYSTEM.MDW)  --Do I need to tweak
the Registry?   Where can I find the fabled SysDB32.exe for tweaking
the registry?

Can somebody help me out please?

* Todd F. Boyle CPA              www.isomedia.com/homes/tboyle

* 9745-128th Av NE, Kirkland WA 98033            (425) 827-3107
* co-moderator        biz.comp.accounting
*        It is illegal to send Unsolicited Commercial Email
*        to mailboxes in the State of Washington



Thu, 14 Sep 2000 03:00:00 GMT  
 VB5, Crystal 4.6.1 -User Level Security password

First specify the security file

DBEngine.SystemDB = "TheSecurityFile"

Then open the workspace

Set ws = DBEngine.CreateWorkspace("", "UserID", "UserPwd")

Then open the database

Set db = ws.OpenDatabase("TheDBFile", t/f, t/f, ";PWD=" & szPassword

Don't forget the semicolon.

The report already knows the tablename so you don't need the
datafiles property. If you want to run the report from a different
table, you'll need to use ODBC and not native Jet.



Quote:
>Hey, can anybody help me with this?  I created a big VB 5.0
>application on JET 3.5 database, for my client.  It has a number of
>complicated Crystal Reports 4.6.1 which I am running with the Crystal
>Reports control on a form, like this:

>sCRWSelection = "{VeriFoneReports.VeriReportDate} = etc etc long...
>rptCRW.SelectionFormula = sCRWSelection
>rptCRW.DataFiles(0) = psDBPath_Filename
>rptCRW.ReportFileName = (App.Path + "\Cashiers.rpt")
>rptCRW.PrintFileName = (App.Path + "\GL.prn")
>rptCRW.Destination = 0
>rptCRW.Action = 1

>Worked beautiful, until they required User Level Security-- now the
>reports all return "Run-time error 20533, Unable to Open Database."

>I have been utterly unable to tweak these reports in  any way to
>enable them to access the database:  the .UserName and .Password
>properties have no effect.

>Will I need to create temporary unprotected MDB files, to print
>Crystal Reports from a secure database?  I can't believe this....

>My security file is C:\...\MyFile.MDW
>(not C:\WinNT\System32\SYSTEM.MDW)  --Do I need to tweak
>the Registry?   Where can I find the fabled SysDB32.exe for tweaking
>the registry?

>Can somebody help me out please?

>* Todd F. Boyle CPA              www.isomedia.com/homes/tboyle

>* 9745-128th Av NE, Kirkland WA 98033            (425) 827-3107
>* co-moderator        biz.comp.accounting
>*        It is illegal to send Unsolicited Commercial Email
>*        to mailboxes in the State of Washington



Sat, 07 Oct 2000 03:00:00 GMT  
 VB5, Crystal 4.6.1 -User Level Security password

Assuming that you have user security as well as a database password,
you must first open the workspace with a userid that your security
file recognizes:

DBEngine.SystemDB = "TheSecurityFile"
Set ws = DBEngine.CreateWorkspace("", "TheUserName",
        "TheUserPassword")

Then you need to open the database with the database password:

Set db = ws.OpenDatabase("DBFilename",T/F, T/F,
                                ";PWD=" & "TheDBPassword")

If your program doesn't know the password, prompt the user.

The report already knows the filename, so you don't need the
datafiles property.

If you want to run the report from a table other than the one you used
to create the report, you'll need to use ODBC and not native Jet.




Quote:
>Hey, can anybody help me with this?  I created a big VB 5.0
>application on JET 3.5 database, for my client.  It has a number of
>complicated Crystal Reports 4.6.1 which I am running with the Crystal
>Reports control on a form, like this:

>sCRWSelection = "{VeriFoneReports.VeriReportDate} = etc etc long...
>rptCRW.SelectionFormula = sCRWSelection
>rptCRW.DataFiles(0) = psDBPath_Filename
>rptCRW.ReportFileName = (App.Path + "\Cashiers.rpt")
>rptCRW.PrintFileName = (App.Path + "\GL.prn")
>rptCRW.Destination = 0
>rptCRW.Action = 1

>Worked beautiful, until they required User Level Security-- now the
>reports all return "Run-time error 20533, Unable to Open Database."

>I have been utterly unable to tweak these reports in  any way to
>enable them to access the database:  the .UserName and .Password
>properties have no effect.

>Will I need to create temporary unprotected MDB files, to print
>Crystal Reports from a secure database?  I can't believe this....

>My security file is C:\...\MyFile.MDW
>(not C:\WinNT\System32\SYSTEM.MDW)  --Do I need to tweak
>the Registry?   Where can I find the fabled SysDB32.exe for tweaking
>the registry?

>Can somebody help me out please?

>* Todd F. Boyle CPA              www.isomedia.com/homes/tboyle

>* 9745-128th Av NE, Kirkland WA 98033            (425) 827-3107
>* co-moderator        biz.comp.accounting
>*        It is illegal to send Unsolicited Commercial Email
>*        to mailboxes in the State of Washington



Sat, 07 Oct 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Crystal and User Level Security passwords

2. OpenDataSource name argument and user-level security

3. User-level security & OpenDataSource name argument

4. Security - User Level

5. User-Level Security problem

6. Access User Level Security HELP!!

7. VB6, ADO, and writing to an Access 2000 db with user level security

8. Opening an Access file with the User Level security feature

9. Stucked on client's machine in user level security

10. User Level security Novice

11. HELP: ADO Connection String - User Level Security...

12. Access - User-Level Security?

 

 
Powered by phpBB® Forum Software