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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report source = current directory

Status
Not open for further replies.

JackBurton07

IS-IT--Management
Oct 17, 2007
75
GB
Hi, How can I link a crystal report source to a database in my applications current directory?

Every time I move the app to a new machine it looks for the database on the other machine.

I just want it t o locate the database thats always in its current directory. I dont know how to reference the source as current directory

Please help


Thanks
JB

 
Assuming you are using an Access database:

Dim DBPath As String

DBPath = Application.StartupPath & "/DB_Name.mdb"


Use DBPath in your connection string.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top