BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New connection

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
giordano
Guest





PostPosted: Mon Nov 15, 2004 11:02 am    Post subject: New connection Reply with 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
Jayme Jeffman Filho
Guest





PostPosted: Tue Nov 16, 2004 11:29 am    Post subject: Re: New connection Reply with 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...
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





PostPosted: Wed Nov 17, 2004 8:55 am    Post subject: R: New connection Reply with 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

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





PostPosted: Wed Nov 17, 2004 11:32 am    Post subject: Re: New connection Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.