I m using VB6 as front end and MS ACCESS 2010 as Database (DAO recordset) , I have created some Parametric queries in Access and also created some Crystal reports based on those queries, all this work find in designe mode, but when i compile the project and make a packe for distribution every thing works fine except crystal reports when i try to run the report it say invalid path can't find datasource location ..... How can i change the datasource location at runtime. or how crystal reports can be created using DAO recordset.

Recommended Answers

All 5 Replies

Make sure path of the datasource at design time and after installation of your application.
It is must to maintain the equal path at design time and after installation.
In deployment wizard set the path where your database will reside. You can set it for every added files.

Dear Jayate thnx 4 ur reply, can u please inform me, how can i add a folder during package and deployment wizard (as my database and reports are resides in different forlders).

You can add or remove any file not any folder.I just say you that you can modify the Installation Location of a file as your choice and as per your requirments. So I said you that be sure the database path at report design time and after installation are both same or not. This type of error can occur for this reason.

Please go through this tutorial.


As per my understanding, it is better to user DSN instead of hardcoded database file path to particular crystal report.

Mr. Deepak can u pls. give me example with code for DSN connection in vb6 as i m using ACCESS 2010 as database (as DAO recordset. and crystal reports 9.22. will thankfull 2 u for ur help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.