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

How to set Database location at run-time

Status
Not open for further replies.

ddipalma

Programmer
Nov 18, 2002
2
US
I really need some help. I am try to set the path at run-time for a secured Access database in Visual Basic and I have had no luck yet.

Does anyone know how to do this?
 
If using ADO refer to

If you are using DAO and Jet this may help -

Dim db as database
DBEngine.SystemDB = &quot;<MyFilespec>.mdw&quot;
DBEngine.DefaultUser = &quot;MyUserID&quot;
DBEngine.DefaultPassword = &quot;MyPassword&quot;
Set db = OpenDatabase(&quot;<MyFileSpec>.mdb&quot;, False, False, &quot;&quot;)


cjw
 
I am having the problem so setting the database location at run-time for the Crystal Report. I tried using connect and it keeps giving me an error SQL Server not started and ends. I needs to be able to set the database location at run-time since the location my differ from client to client.

I am using ADO and a Microsoft Access database that is secured.

Does any one have any ideas?

Thanks in advance.
 
If you've found an answer to your issue, could you share it with me? I'm working on something similar, i need my reports to jump to different SQL Servers at runtime. If i figure it out in the meantime, i'll let you know. Thanks.
 
Hi

I am using recordset to overcome this problem. At runtime I execute the SP from my ASP Page and pass recordset to the Crystal Reports. You can link recordset using ttx Files.

Regards
Krishna Kumar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top