Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 30th, 2005, 11:22 PM
Authorized User
Join Date: Aug 2003
Location: Kolkata, West Bengal, India.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kaustav Send a message via Yahoo to Kaustav
Default Passwrd protected mdb file from Crystl Rpt in vb6

Plz help. Its urgent. When i m trying to connect an access database using crystal report viewer in vb6 I am getting an error saying "not a valid password". I have tried OLEDB, Access(dao) connections from crystalreport1 designer control. But in vain.

PLz give me a through detail about how can i solve this problem.
Note: my database report can be opened directly by crystal report directly without going through vb6.


Reply With Quote
  #2 (permalink)  
Old October 24th, 2005, 08:08 PM
Registered User
Join Date: Oct 2005
Location: Miami, FL, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

You need to prepend a linefeed character to the password for it to work, see the example below:

Dim mCRXReport As CRAXDRT.Report
Dim crxTable As CRAXDRT.DatabaseTable

Set mCRXReport = mcrxApplication.OpenReport _
                    ("MyFolder\MyReport.rpt", 1)

    For Each crxTable In mCRXReport.Database.Tables
        'The next line just supplies the database location
        crxTable.SetTableLocation "c:\MyStuff\MyData.mdb", "", ""
        'Add a linefeed to your password
        crxTable.SetSessionInfo "", Chr(10) & "MyPassword"
    Next crxTable

Best Regards,

Al Weisenborn
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create database (.mdb) file in vb6 code mrleokarthik Pro VB 6 13 August 7th, 2009 11:39 AM
Crystal Report 9 password protected mdb ACCESS sajid_rauf Pro VB Databases 2 July 27th, 2007 02:29 AM
Change Printer at run time for crystal rpt, VB6.0 fiiyo ASP.NET 1.0 and 1.1 Basics 0 September 19th, 2006 06:58 AM
Open mde or mdb access file from vb6 gorgo Pro VB 6 1 February 20th, 2006 01:39 AM
Clearing all records in an .mdb table from VB6 rwheeler Pro VB Databases 5 December 9th, 2004 03:23 PM

All times are GMT -4. The time now is 12:36 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.