FireBird Script connecting with ODBC

Hi guys,
I need to write a script, that connects to another computer. But the idea is, that the bdname in create connection statement looks like this '192.168.1.1:c:\database'. I want to replace this string with an ODBC DSN. Is there a way to do this?
IncognitoManAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

twinsoftCommented:
Hi,
What kind of components do you use to open the ODBC DSN ?
Usually you set all connection info when you create the DSN (in windows/control panel etc), and then just call it from a ODBC or ADO component from Delphi...
0
twinsoftCommented:
And you cannot use components designed to work directly with Firebird like IBX, IBDAC, IBOBJECTS etc with ODBC DSN. You must provide the connection info to their respective properties...
0
IncognitoManAuthor Commented:
No no no, :)
you didn't understand my question. I am not connecting a FireBird database with a delphi or VS application. I am writing a IB Expert database script on the client PC which needs to insert data in the server PC.
http://ibexpert.net/ibe/index.php?n=Doc.CREATECONNECTION
This is the link with the documentation and specifically about the create connection clause. But as you ca see in the example below, they use the server IP and the path to the file in the server. I personally think, that it is stupid to write a path, that is not in your machine :). So i want to create a ODBC datasource on the server and somewhat connect using this datasource.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

twinsoftCommented:
It is the same logic as described above. IBExpert uses direct connection to the DB and cannot "understand" the DSN information.

Maybe you could use DB aliases. You edit the Aliases.conf located in Firebird directory. There you can give an alias name and a connection path:

myDB = 192.168.1.1:c:\data\Demo.fdb

Then use this alias in IBExpert...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IncognitoManAuthor Commented:
No, this thing with the aliases won't help me. If i change the database path on the server, I need to change the path in the conf file.
However I didn't know Firebird doesn't inderstand the DSN, because in C# if I make a odbc connection to a firebird database it needs to have a ODBC Datasource. You helped me a lot by telling me this. Thank you twinsoft.
0
IncognitoManAuthor Commented:
Thanks twinsoft. You helped.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.