Subject | Re: [firebird-support] How to connecto to an embedded Firebird? |
---|---|
Author | W O |
Post date | 2011-07-10T19:21:24Z |
Hello everybody
Very good answers, I can see the problem more clearly now.
The following code works very well:
Local lcConnectionString, lnHandle
lcConnectionString = "DRIVER=Firebird/InterBase(r) driver;" ;
+ "DBNAME=ADMIN.FDB;" ;
+ "CLIENT=fbembed.dll"
lnHandLe = SQLSTRINGCONNECT(lcConnectionString)
if lnHandle > 0 && connection OK
lnError = SQLEXEC(lnHandle, "SELECT * FROM CITIES", "TEMP")
if lnError > 0 && Query OK
BROWSE
endif
=SQLDISCONNECT(lnHandle)
else && connection ERROR
=AERROR(laErrors) && Put the number, description, etc. of the
error in the array laErrors
? "ERROR: " + laErrors[2]
endif
Return
*
*
Without user, without password, it does its job.
But...with the ODBC driver already installed.
I shall try to do the same thing without an ODBC driver installed, maybe it
can be done.
Thank you.
Walter.
On Sun, Jul 10, 2011 at 2:45 PM, Iwan Cahyadi Sugeng <
iwan.c.sugeng@...> wrote:
Very good answers, I can see the problem more clearly now.
The following code works very well:
Local lcConnectionString, lnHandle
lcConnectionString = "DRIVER=Firebird/InterBase(r) driver;" ;
+ "DBNAME=ADMIN.FDB;" ;
+ "CLIENT=fbembed.dll"
lnHandLe = SQLSTRINGCONNECT(lcConnectionString)
if lnHandle > 0 && connection OK
lnError = SQLEXEC(lnHandle, "SELECT * FROM CITIES", "TEMP")
if lnError > 0 && Query OK
BROWSE
endif
=SQLDISCONNECT(lnHandle)
else && connection ERROR
=AERROR(laErrors) && Put the number, description, etc. of the
error in the array laErrors
? "ERROR: " + laErrors[2]
endif
Return
*
*
Without user, without password, it does its job.
But...with the ODBC driver already installed.
I shall try to do the same thing without an ODBC driver installed, maybe it
can be done.
Thank you.
Walter.
On Sun, Jul 10, 2011 at 2:45 PM, Iwan Cahyadi Sugeng <
iwan.c.sugeng@...> wrote:
> **[Non-text portions of this message have been removed]
>
>
> It is true that there us an update to the odbc driver.but still you need to
> use odbc to connect to firebird db.that is the only option available for
> foxpro,because there is no native driver that can connect foxpro to
> firebird
> natively without odbc.
> But there might be one solution for you to try it,
> I don't know foxpro language so i can't help with the syntax in foxpro,but
> you can try googling for a visual basic file dsn string connection. It
> should show some information on how to connect to an odbc using filedsn,try
> to search on how to use an odbc driver without installing it
>
> A little advice from me.you should consider to use other language if you
> really need to run it on usb.
>
> good luck
>
> iwan cs
>
>
> [Non-text portions of this message have been removed]
>
>
>