|
-
Apr 13th, 2007, 02:21 AM
#1
Thread Starter
New Member
Change database source via code
dear all,
i have a problem with my vb application,i have 2 similar database but i use one application.
so can i change the database source on crystal report by using vb code?
i use SQL server database and use Dsn for the connection string..
example:
i log on to my application using database A and i open my report using that database.
but when i log in again using database B and i open my report,it's still use database A.anyone can help me?
thanks alot
NB: sorry my english is very bad. 
best regards
martell
Last edited by martell; Apr 13th, 2007 at 02:27 AM.
Reason: change
-
Apr 13th, 2007, 02:52 AM
#2
Re: Change database source via code
Changing the connection (close and open with a new connection string) to the apropriate DB should be enough (if they are truly similar in structure)
If you're using a ADODC you can change it's connection as well by
closing it and reopening with the other connection string.
You should focus on the connection used by your report.
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
-
Apr 15th, 2007, 09:29 PM
#3
Thread Starter
New Member
Re: Change database source via code
do u knoe how to change the database via code in the report?
use this (report.Database.SetDataSource) ????
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|