 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
giordano Guest
|
Posted: Mon Nov 15, 2004 11:02 am Post subject: New connection |
|
|
I have this problem:
I have an application with C++ Builder 5 and I need to change dataBase name
in run-time; I can't define an AliasName because the operator choose the
dataBase name run-time. Is there a way to do this (I hope that someone
understanding my problem !!!) ???
Thanks Silvana
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Tue Nov 16, 2004 11:29 am Post subject: Re: New connection |
|
|
Hello Silvana,
You just have to drop down a TDatabase component, if you're using BDE,
and set its properties at runtime. This is quite simple when using dBase or
Paradox database systems, if you're using ODBC you should first set up an
ODBC DNS at runtime.
HTH
Jayme.
"giordano" <giordano (AT) giordanocompany (DOT) it> escreveu na mensagem
news:41988c3e (AT) newsgroups (DOT) borland.com...
| Quote: | I have this problem:
I have an application with C++ Builder 5 and I need to change dataBase
name
in run-time; I can't define an AliasName because the operator choose the
dataBase name run-time. Is there a way to do this (I hope that someone
understanding my problem !!!) ???
Thanks Silvana
|
|
|
| Back to top |
|
 |
giordano Guest
|
Posted: Wed Nov 17, 2004 8:55 am Post subject: R: New connection |
|
|
Sorry
but I don't understand what I can do !!!
I must open an Access dataBase, but one time the name is Dati.mdb, another
time is DatiX.mdb, ... (the operator choose the name run-time); I try with a
TDatabase object and I put DriverName=Microsoft Access Driver (*.mdb) and
DatabaseName=Dati.mdb, but when I try to connected, compare the message
"Invalid parametrs".
You wrote that I must set up an ODBC DSN at runtime but ... I don't know
what can I do this !!!
Can you help me again ?
Thanks Silvana
Jayme Jeffman Filho <jaymenosp (AT) jeffman (DOT) eng.br> wrote in message
[email]4199e684 (AT) newsgroups (DOT) borland.com[/email]...
| Quote: | Hello Silvana,
You just have to drop down a TDatabase component, if you're using BDE,
and set its properties at runtime. This is quite simple when using dBase
or
Paradox database systems, if you're using ODBC you should first set up an
ODBC DNS at runtime.
HTH
Jayme.
"giordano" <giordano (AT) giordanocompany (DOT) it> escreveu na mensagem
news:41988c3e (AT) newsgroups (DOT) borland.com...
I have this problem:
I have an application with C++ Builder 5 and I need to change dataBase
name
in run-time; I can't define an AliasName because the operator choose the
dataBase name run-time. Is there a way to do this (I hope that someone
understanding my problem !!!) ???
Thanks Silvana
|
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Wed Nov 17, 2004 11:32 am Post subject: Re: New connection |
|
|
The C++Builder only supports direct access to MS Access 97,
and, of course, you can select the "mdb" file and set the TDatabase
parameters at runtime, only for MS Access 97 !
Earlier versions of MS Access require an ODBC connection or you
should use ADO connection components, which I've never used, also
I've never set up any ODBC data source at run time, I only know
how to do it at design time.
Take a look at OTL :
http://otl.sourceforge.net/home.htm and
Jerry Bloomfield's Code Central at :
http://cc.borland.com/ccweb.exe/
I bet you'll find out a solution .
HTH
Jayme.
"giordano" <giordano (AT) giordanocompany (DOT) it> escreveu na mensagem
news:419b1168 (AT) newsgroups (DOT) borland.com...
| Quote: | Sorry
but I don't understand what I can do !!!
I must open an Access dataBase, but one time the name is Dati.mdb, another
time is DatiX.mdb, ... (the operator choose the name run-time); I try with
a
TDatabase object and I put DriverName=Microsoft Access Driver (*.mdb) and
DatabaseName=Dati.mdb, but when I try to connected, compare the message
"Invalid parametrs".
You wrote that I must set up an ODBC DSN at runtime but ... I don't know
what can I do this !!!
Can you help me again ?
Thanks Silvana
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|