Board index » delphi » migration

migration

Access 2000 + Win 2000 + ADO
In the ADO connection, I set the connection string to the local data source.
after the connected is true, the value of default database is local
directiory : c:\data\d.mdb....
I have the same database and datasource name in another machine, but not the
same directory. I want to move my program to the machine, will it work?  --
actually it is a web application, I can't know the location, but the ASP
works well with the ODBC DSN.
 

Re:migration


Quote
"Yang" <xdyang20...@yahoo.com> wrote in message news:3a9cc19b_2@dnews...
> Access 2000 + Win 2000 + ADO
> In the ADO connection, I set the connection string to the local data
source.
> after the connected is true, the value of default database is local
> directiory : c:\data\d.mdb....
> I have the same database and datasource name in another machine, but not
the
> same directory. I want to move my program to the machine, will it
ork?  --
> actually it is a web application, I can't know the location, but the ASP
> works well with the ODBC DSN.

Yang

Don't write your connection string in the Connection object
insted write it in a UDL file or a simple text file and load it on your
ADOCOnnection.BeforeConnect method

Regards

     David B.E

Re:migration


Quote
"Stone Young" <xdyang2...@yahoo.com> wrote in message

news:3a9d9e17$1@rpc1284.daytonoh.ncr.com...

Quote
> I know in ASP or VB, if you have system DSN in machines, just use:

> strConnection = "DSN=MyDSN"
> objConn.Open strConnection

> it works. in Dephi ADO express it alwasys goes into the local database:
the
> file (directory) which you set in the ODBC settings. so the program can't
be
> run in different machines.

> if I load the connection string in beforeconnect, is the string same as
the
> connection string in the "build" ?  the string still contains local
> connection (directory, file name) information.

> David B.E <agros...@arava.co.il> wrote in message
> news:97jdqc$8bq3@bornews.inprise.com...

> > "Yang" <xdyang20...@yahoo.com> wrote in message news:3a9cc19b_2@dnews...
> > > Access 2000 + Win 2000 + ADO
> > > In the ADO connection, I set the connection string to the local data
> > source.
> > > after the connected is true, the value of default database is local
> > > directiory : c:\data\d.mdb....
> > > I have the same database and datasource name in another machine, but
not
> > the
> > > same directory. I want to move my program to the machine, will it
> > ork?  --
> > > actually it is a web application, I can't know the location, but the
ASP
> > > works well with the ODBC DSN.

> > Yang

> > Don't write your connection string in the Connection object
> > insted write it in a UDL file or a simple text file and load it on your
> > ADOCOnnection.BeforeConnect method

> > Regards

> >      David B.E

> '

Every machine will have it's one specific file with connection string
just remember to clear your connection.ConnectionString before you deploy
your application

David

Other Threads