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. ?
Falconi Silvio
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 may use ADO to open and manage it.
on the same mode I open MDB access file ?
thanks I try now
to print each structure table
wich is the command ?
Silvio wrote:to print each structure table
wich is the command ?
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 NILthanks emg,
It give me error
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;
Called from: win32ole.prg => TOLEAUTO:_ACTIVECONNECTION(0)
Called from: test.prg => MAIN(45)
There is a sample Firebird connection string on this page:
http://www.connectionstrings.com/?carrier=firebird
Regards,
James
i try with Driver=Firebird/InterBase(r) driver;Uid=SYSDBA;Pwd=masterkey;DbName=TEST.FDB;
but it make the same error
You have to use your own user ID and password.
James
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. ?
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
Called from: win32ole.prg => TOLEAUTO:_ACTIVECONNECTION(0)
Called from: test.prg => MAIN(45)
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
Dear wmormar
I try also it
no run ok
Maybe you haven't installed Firebird drivers correctly or haven't installed them at all.
EMG

Silvio wrote:NO
I have installed Firebird correctly VERSION 2.1