pg_india
asked on
change File DSN using Vb program
How can i change a file DSN using a vb application???
You simply need to re-create (overwrite) it. See http://support.microsoft.com/default.aspx?scid=kb;en-us;184608&Product=vb6
ASKER
that article discuss about the system dsn. is the process same for file dsn???
I never used file DSN (in fact I never use DSNs otherwise being forced to!)
Try to create a system DSN and use from your application to see which one (system or file) will be used.
Try to create a system DSN and use from your application to see which one (system or file) will be used.
ASKER
actually i am using crystal report and i thk crystal erport works with DSn only and not without that!! Please correct me if i am wrong.
Also how can i retrieve the values from an existing file DSN? because before changing i shoudl know whether a change is required or not..
Also how can i retrieve the values from an existing file DSN? because before changing i shoudl know whether a change is required or not..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
IF your using an ODBC connection with your DNS name, you can just change a value in the registry on the machine to achive your results. query the registry for the DNS you require and if it is not correct, change it to the appropriate value. I use this to change from an MS Access to an SQL server connection and use the same report with both version in a CR viewer in a VB project.
ASKER
actually i am using file dsn...is that stored in registry??? What i have heard is that file dsn can be copied directly from one system to another and they are machine independent. in that case no value should be stored in dsn!
also if i change any detail in file dsn using a notepad do i need to update anything in registry.
also if i change any detail in file dsn using a notepad do i need to update anything in registry.
Yes it is. You can create seperate registry key and store them as .reg file. as you need them you import them to the registry and have your report use the same key to different datasources.
ASKER
James i didn't understand you,
my question is:
can i use a file dsn created on a system A on another system B without anything to do with Registry?
my question is:
can i use a file dsn created on a system A on another system B without anything to do with Registry?