Urgent: How Open a Firebird

Urgent: How Open a Firebird

Postby Silvio » Fri Sep 26, 2008 8:37 am

I must open a fdb archive and list the structure of each table
How I can make it ?

Can I have a small sample pls. ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Fri Sep 26, 2008 9:29 am

Silvio,

You may use ADO to open and manage it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Fri Sep 26, 2008 9:49 am

on the same mode I open MDB access file ?
thanks I try now


to print each structure table
wich is the command ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Enrico Maria Giordano » Fri Sep 26, 2008 10:57 am

Silvio wrote:to print each structure table
wich is the command ?


Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL oCat

    LOCAL i, j

    oCat = CREATEOBJECT( "ADOX.Catalog" )

    oCat:ActiveConnection = "Your connection string"

    FOR i = 0 TO oCat:Tables:Count() - 1
        ? oCat:Tables( i ):Name
        ?

        FOR j = 0 TO oCat:Tables( i ):Columns:Count() - 1
            ? SPACE( 4 ),;
              PADR( oCat:Tables( i ):Columns( j ):Name, 20 ),;
              STR( oCat:Tables( i ):Columns( j ):Type, 5 ),;
              STR( oCat:Tables( i ):Columns( j ):DefinedSize, 10 ),;
              STR( oCat:Tables( i ):Columns( j ):Precision, 5 )
        NEXT

        ?
    NEXT

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Fri Sep 26, 2008 3:14 pm

thanks emg,
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Fri Sep 26, 2008 3:41 pm

It give me error


Application
===========
Path and name: C:\work\prg\firebird\test.Exe (32 bits)
Size: 1,311,744 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 09/26/08, 17:42:11
Error description: Error ADOX.Catalog/16389 E_FAIL: _ACTIVECONNECTION
Args:
[ 1] = C Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.fdb;User Id=admin;Password=bpteramo;

Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:_ACTIVECONNECTION(0)
Called from: test.prg => MAIN(45)
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby James Bott » Fri Sep 26, 2008 3:50 pm

There is a sample Firebird connection string on this page:

http://www.connectionstrings.com/?carrier=firebird

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Silvio » Sat Sep 27, 2008 12:32 am

i try with Driver=Firebird/InterBase(r) driver;Uid=SYSDBA;Pwd=masterkey;DbName=TEST.FDB;

but it make the same error
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby James Bott » Sat Sep 27, 2008 5:42 am

You have to use your own user ID and password.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Urgent: How Open a Firebird

Postby wmormar » Sat Sep 27, 2008 6:08 am

Silvio wrote:I must open a fdb archive and list the structure of each table
How I can make it ?

Can I have a small sample pls. ?


Silvio,

you see the blog from Andres.

CODIGO-BASE
William, Morales
Saludos

méxico.sureste
User avatar
wmormar
 
Posts: 1074
Joined: Fri Oct 07, 2005 10:41 pm
Location: México

Postby Silvio » Sat Sep 27, 2008 10:28 am

I insert My admin and My password
Application
===========
Path and name: C:\work\prg\firebird\test.Exe (32 bits)
Size: 1,311,744 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 09/27/08, 12:29:11
Error description: Error ADOX.Catalog/16389 E_FAIL: _ACTIVECONNECTION
Args:
[ 1] = C Driver=Firebird/InterBase(r) driver;Uid=Administrator;Pwd=bpteramo;DbName=test.fdb

Stack Calls
===========
Called from: win32ole.prg => TOLEAUTO:_ACTIVECONNECTION(0)
Called from: test.prg => MAIN(45)

System
======
CPU type: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ -19448 Mhz
Hardware memory: 2048 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: xHarbour build 0.99.71 Intl. (SimpLex)
Windows version: 5.1, Build 2600 Service Pack 2

Windows total applications running: 0
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Sat Sep 27, 2008 10:29 am

Dear wmormar
I try also it
no run ok
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Enrico Maria Giordano » Sat Sep 27, 2008 10:34 am

Maybe you haven't installed Firebird drivers correctly or haven't installed them at all.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Sat Sep 27, 2008 10:47 am

NO

I have installed Firebird correctly VERSION 2.1

and the service run correctly as you can see here

Image


the test of wnormar (Tfirebird) run correctly
I must to insert sample.gdb in c:\bases
But My archive is Fdb extension no gdb


Dear Emg ,
with your sample How I must make the connection for the test.fdb ?
thanks
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Enrico Maria Giordano » Sat Sep 27, 2008 10:49 am

Silvio wrote:NO

I have installed Firebird correctly VERSION 2.1


You have to install Firebird drivers for ODBC/ADO too.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests