Urgent: How Open a Firebird
Urgent: How Open a Firebird
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. ?
How I can make it ?
Can I have a small sample pls. ?
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Silvio wrote:to print each structure table
wich is the command ?
Code: Select all
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
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)
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
Falconi Silvio
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
There is a sample Firebird connection string on this page:
http://www.connectionstrings.com/?carrier=firebird
Regards,
James
http://www.connectionstrings.com/?carrier=firebird
Regards,
James
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Urgent: How Open a Firebird
Silvio,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. ?
you see the blog from Andres.
CODIGO-BASE
William, Morales
Saludos
méxico.sureste
Saludos
méxico.sureste
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
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
Falconi Silvio
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
NO
I have installed Firebird correctly VERSION 2.1
and the service run correctly as you can see here
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
I have installed Firebird correctly VERSION 2.1
and the service run correctly as you can see here
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
Falconi Silvio
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: