Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Secured Access '97 database

Status
Not open for further replies.

CarolR

Programmer
Jun 9, 2000
13
0
0
US
I am using VB 6.0 and Crystal Reports 7 in a networked environment.&nbsp;&nbsp;Our data is stored in Access '97.&nbsp;&nbsp;I am ready to put a new system into production.&nbsp;&nbsp;The last step we did was to 'secure' the database that will be used.&nbsp;&nbsp;Before the database was secured everything worked fine.&nbsp;&nbsp;After the database was secured, both VB and Crystal Reports could not access the data saying there was a permissons problem.&nbsp;&nbsp;I found the VB solution so I can now access the data through data entry screens.&nbsp;&nbsp;I still need to be able to access the data through Crystal Reports(which runs through my VB applicaiton).&nbsp;&nbsp;When my VB application calls the crystal report, I get the following three error messages in order:<br><br>Not all objects are granted sufficient rights to be accessed.<br><br>Error opening file.&nbsp;&nbsp;file could not be opend: &quot;DISPTPTS&quot;, at file locaiton: &quot;DISPTOTS&quot;<br><br>Run-time error '-2177192179(8004728d)'&quot;&nbsp;&nbsp;Erorr dected by database dll<br><br>I think the problem is Crystal Reports accessing the system.mdw problem.&nbsp;&nbsp;Our only solution right now is to leave the database unsecured which is not our first choice.&nbsp;&nbsp;Any help or thoughts would be appreciated.
 
Greetings.<br><br>I got around this problem by creating the Crystal Report via a ODBC Data Source Name (DSN) that I manually created.&nbsp;&nbsp;The DSN contains the name of the Access 97 database along with the User ID, password and System database name (system.mdw).<br><br>When my VB program is executed, it creates the DSN on the client's workstation with the above information.&nbsp;&nbsp;I'm using VB5 with Crystal Reports 7<br><br>If you need examples, please let me know.<br><br>
 
I was thinking about doing that ODBC thingie... but I wasn't sure how to do the drivers.  If you could post an example, that would be great. <br><br>   Thanks
 
Carol:<br><br>Here is the code that I use to create an ODBC data source name for MS Access 97 called Telecommunications:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Str = &quot;Description=Telecommunications&quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vbCr & &quot;Driver={Microsoft Access Driver (*.mdb)}&quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vbCr & &quot;Dbq=r:\apps\access\facility\telecom97.mdb&quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vbCr & &quot;SystemDB=r:\apps\access\facility\system.mdw&quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vbCr & &quot;UID=chicago&quot; & _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vbCr & &quot;PWD=gandalf&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;DBEngine.RegisterDatabase &quot;Telecommunications&quot;, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Microsoft Access Driver (*.mdb)&quot;, True, Str<br><br>This code is from a VB5 program.&nbsp;&nbsp;Please let me know if you need further information.<br><br>....Keyser<br>
 
I added the code for the driver and everything works great.&nbsp;&nbsp;Thanks a lot for your help.&nbsp;&nbsp;Have you found any books/manuals that go into detail about how to use Crystal from withing VB?&nbsp;&nbsp;There are so many options and parameters, but they are not explained very well.&nbsp;&nbsp;I have figured out a lot of stuff just by guessing, it would be nice to have a real book.
 
Carol:<br><br>I haven't used any manuals other than what is provided with Crystal Reports, newsgroups and other websites.&nbsp;&nbsp;I'm in the same boat as you, kind of learning about the product as I go.<br><br>I did see a book on the Amazon website that might be of use to you:<br><br><A HREF=" TARGET="_new"> is a link to the book &quot;Crystal Reports 7:&nbsp;&nbsp;The Complete Reference Guide.&quot;&nbsp;&nbsp;There may be other books out there, but this one seems to get a high rating, especially if you plan on doing VB programming via Active X controls or API calls.&nbsp;&nbsp;Let me know what you think.<br><br>.... Kirk
 
Thanks, I'm going to have my agency order it...
 
Kirk,<br><br>Sorry to bother you...&nbsp;&nbsp;Now that I've swtiched to the ODBC drivers, my record selection formula which I passed from my VBapp to my report doesn't seen to work.&nbsp;&nbsp;It doesn't filter out any records:&nbsp;&nbsp;<br><br>&nbsp;ReportDA.RecordSelectionFormula = &quot;{baccomp.DATE} in &quot; _ &<br>&nbsp;frmGetDates.strbdate & &quot; to &quot; & frmGetDates.strEdate<br><br>I have the user enter the strbdate and edate in a form and build the formula from there.&nbsp;&nbsp;I inserted the recordselectionformula from the special fields on to the report so I could see if it go passed and the formula is there, it just doesn't do anything. It worked before I started using the ODBC drivers.<br><br>I feel like a dope.&nbsp;&nbsp;Got any ideas?<br><br>Carol
 
Carol:<br><br>Has your report been readjusted to use the ODBC connection?&nbsp;&nbsp;You can check this by going into Crystal Reports, open the report and go Database/Set Location.&nbsp;&nbsp;Your ODBC data source name should be listed for each table in the drop-down list.<br><br>Let me know if this solves your problem. :)<br><br>.... Kirk
 
Been there, done that....&nbsp;&nbsp;My connection was set for the ODBC thingie.&nbsp;&nbsp;This stinks.&nbsp;&nbsp;Thanks for replying anyway.&nbsp;&nbsp;&nbsp;I'm on vacation next week, so i don't really care that much for the moment....&nbsp;&nbsp;Of course this nonsense will still be waiting for me when I get back.&nbsp;&nbsp;Seriously, thanks for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top