Subject | Re: [firebird-support] Re: FireBird ODBC *Create* string |
---|---|
Author | Doru Constantin |
Post date | 2004-02-04T15:45:43Z |
Venus Software Operations wrote:
http://www.ibphoenix.com:
"DRIVER={Firebird/InterBase(r)
driver};UID=SYSDBA;PWD=masterkey;DBNAME=doru/3050:myDB;ROLE=;DIALECT=3;"
where :
- doru is the name of the server
-myDB is the alias name of "someDB" in [alias.conf] file
in VFP:
h = SQLSTRINGCONNECT("DRIVER={Firebird/InterBase(r)
driver};UID=SYSDBA;PWD=masterkey;DBNAME=doru/3050:myDB;")
> Hi Dorinassuming that you are using the OdbcJdbc driver from
>
> Thanks for responding.
>
> At 01:22 pm 04/02/2004, you wrote:
>
> >You can use File DSN. This way you don't need to deal with windows
> >registry.
>
> Okay
>
> >The problem is that the ODBC driver crash for this option
> >in ODBC data sources manager
>
> For File DNS system?
>
> >But is simple to create a file like this within your program.
> >Sample DSN file :
> >
> >[ODBC]
> >DRIVER=Firebird/Interbase(r) driver
> >DBNAME=localhost:C:\PROJECTS\TEST.FDB
>
> Done
>
> >You also can add UID and PWD connection attributes, but is not
> >secure (anyone can view the dsn file). Better add those attributes
> >in connnection string dynamically
>
> Okay
>
> >Example (I know you use Visual FoxPro so I'll be specific to this):
>
> I appreciate your remembering. Thanks.
>
> >User and password are entered in a login form and stored in variables
> >UserId and UserPwd
> >
> >ConHnd = SQLSTRINGCONNECT("filedsn={file dsn
> >path};UID="+UserId+";PWD="+UserPwd)
>
> Okay. Sorry but now what to do with the connection handle?
>
> I use a Remote Views DBC which uses Connections stored in the same
> DBC. This connection in turn uses a specified Machine DSN name. The
> creation of Machine DSN I have succeed in creating for VFP databases for
> use in a third party reporting tool named Report Manager. This automatic
> creation of Machine DSN helps me when the user changes the path of the
> database or I have a database in a particular location on my development
> machine and the user has it somewhere else.
>
> So I was hoping to create the Machine DSN for a FireBird database so I
> can
> depend on the consistency of Machine DSN name which according to my
> application framework is similar in structure for all the
> applications. And the actual location of the database is stored in this
> Machine DSN which allows me to create the Remote Views based on the
> Connections in the DBC and reports in Report Manager based on the
> Machine DSN
>
> I have a class from UT which does all the leg-work for creating ODBC
> connections as soon as I start the application, so all I have to do is
> pass
> a valid string to the class and the ODBC registry etc. is not my
> headache <g>.
>
> Any pointer to get the creation string?
http://www.ibphoenix.com:
"DRIVER={Firebird/InterBase(r)
driver};UID=SYSDBA;PWD=masterkey;DBNAME=doru/3050:myDB;ROLE=;DIALECT=3;"
where :
- doru is the name of the server
-myDB is the alias name of "someDB" in [alias.conf] file
in VFP:
h = SQLSTRINGCONNECT("DRIVER={Firebird/InterBase(r)
driver};UID=SYSDBA;PWD=masterkey;DBNAME=doru/3050:myDB;")