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?
 
twinsoftConnect With a Mentor Commented:
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
 
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
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.