Altering the DNS path / ODBC using a batch file or similar?



Hi there,

I wonder if some kind soul could help me please?

We have a custom application that uses an Access.mdb file and checking the
DSN shows everything pointing to the correct place and everything works fine
as expected.

However we wish to run our application to parse & use a different .mdb file
(or in fact up to two more depending upon requirements) and to save the
hassle of renaming the files in question I want to create 3 different batch
files that will alter the DSN pointer and then run our application.

Unfortunately the application has no command line syntax where you could
specify the name of the .mdb you wish it to open...it seems to depend upon
the System DNS to tell it where the file is located and what it is called.

I had in mind a simple sort of batch file along the lines of;

change_DSN_to_point_to_alternative_file
Run application

In fact we would need to create 3 different batch files in total - one for
each .mdb that we wish our program to open.

Is this even possible?

Maybe there is a program or other way of achieving this?

Any hints/tips would be most gratefully welcomed.

--
Thanks & regards,
-pp-


.



Relevant Pages

  • Re: Altering the DNS path / ODBC using a batch file or similar?
    ... I wonder if some kind soul could help me please? ... DSN shows everything pointing to the correct place and everything works fine ... However we wish to run our application to parse & use a different .mdb file ... I had in mind a simple sort of batch file along the lines of; ...
    (microsoft.public.data.odbc)
  • Re: Use task scheduler to start up an MDB form?
    ... path name of the MDB. ... double clicking on the batch file starts things up just ... so i tried having each task scheduler call access directly, ... >> double clicking on a .bat file that uses this, ...
    (microsoft.public.access.forms)
  • RE: Connect to SQL Server 2000 .mdb .adb
    ... order to connect using the mdb database, when your users use the mdb that is ... Online option in SQL server will give you all the details to handle this task, ... > Access front end .mdb to link to these tables through a DSN file. ...
    (microsoft.public.access.reports)
  • Re: Database or Project?
    ... I just create a blank database, copy the mdb file to the ... On that PC you create an ODBC DSN and then use ... that to create links to the tables on the SQL Server (with code the links can ... cases passthrough queries which use the same ODBC connection. ...
    (microsoft.public.access.tablesdbdesign)
  • RE: Multiple Access Databases for Forms
    ... Are you saying that instead of opening the mdb each time, ... instead run the batch file to do the copy then start the app? ... but wouldn't that really slow the app opening from a user ...
    (microsoft.public.access.formscoding)