nevodj Posted September 6, 2011 Posted September 6, 2011 Hello, I can't find anything helpful in the forums about querying a Firebird database. Does anyone know if this can be done and how? Thanks
Luigi Posted September 6, 2011 Posted September 6, 2011 Hi nevodj, see #include <FireBird.au3> Local $wer Global $h_fbDll = DllOpen("C:\bird\bin" & "\fbdll4vb20.dll") Global $servername="192.168.0.5" Global $sDBName="C:\Program Files\Firebird\Firebird_1_5\bin\Zimkps.gdb" Local $sUsername = "sysdba" Local $sPassword = "masterkey" ;_FireBird_Help($h_fbDll) _FireBird_ConnectDatabase($h_fbDll, $servername, $sDBName, $sUsername, $sPassword) ;_FireBird_About($h_fbDll) ;_FireBird_Help($h_fbDll) ConsoleWrite( _FireBird_ExecuteStatement($h_fbDll,"select * from tubaina")) exit Visit my repository
nevodj Posted September 7, 2011 Author Posted September 7, 2011 Thanks detefon I dont really understand dll calls or firebird.. i'm an SQL fan and have never touched one of our systems which is running on firebird... i have the firebird database on a windows server, does this script require firebird to be installed on the client machine before the script will connect?the filepaths to the dll and the .gdb, are they were the files are located on the server or the client? Global $h_fbDll = DllOpen("C:\bird\bin" & "\fbdll4vb20.dll")Global $servername="192.168.0.5"Global $sDBName="C:\Program Files\Firebird\Firebird_1_5\bin\Zimkps.gdb"thanks for your help
Luigi Posted September 7, 2011 Posted September 7, 2011 (edited) Hi nevodj, now with more information! 8D Good luck! #include <FireBird.au3> Global $h_fbDll = DllOpen("C:\bird\bin\fbdll4vb20.dll") ; path from 'fbdll4vb20.dll' in client side. Global $servername = "192.168.0.5" ; Firebird IP server Global $sDBName="C:\Program Files\Firebird\Firebird_1_5\bin\Zimkps.gdb" ; The line above is the path from 'Zimkps.gdb' in the server ; You must write a script client with a path server from .gdb file Local $sUsername = "sysdba" Local $sPassword = "masterkey" _FireBird_ConnectDatabase($h_fbDll, $servername, $sDBName, $sUsername, $sPassword) ConsoleWrite( _FireBird_ExecuteStatement($h_fbDll, "select * from tubaina")) Edited September 7, 2011 by detefon Visit my repository
nevodj Posted September 8, 2011 Author Posted September 8, 2011 thanks champ, couple of things i still dont understand: 1. Global $h_fbDll = DllOpen("C:\bird\bin\fbdll4vb20.dll") ; path from 'fbdll4vb20.dll' in client side.does this mean firebird has to be installed on the client? 2.; You must write a script client with a path server from .gdb file... could you explain here? thanks!
Luigi Posted September 8, 2011 Posted September 8, 2011 (edited) [Client side]Global $h_fbDll = DllOpen("C:\bird\bin\fbdll4vb20.dll") ; path from 'fbdll4vb20.dll' in client side.The AutoIt do not have parts to connnect in firebird, you must have download this dll (fbdll4vb20.dll) and put in someplace, maybe in the same folder like your client's script or another folder... This is only the path's dll.I make the test with script a long time ago... I cant' remenber now if is necessary install firebird client or only download fbdll4vb20.dll and use that. I know a little of MySQL, and it need only to connect: IP, username, password... Nothing more. [server side]Firebird needed: IP, username, password and the path's DB (or $sDBName).This path is a place's from .gdb file in the server machine. After you install a firebird module server in your 'server' and create your database's firebird, you must find the folder's .gdb file.Something like this...Global $sDBName="C:\Program Files\Firebird\Firebird_1_5\bin\Zimkps.gdb" Good Luck (II)! Edited September 8, 2011 by detefon Visit my repository
nevodj Posted September 9, 2011 Author Posted September 9, 2011 ok i've got this far. when i run it i get this message - IBPP::Exception inside GDS::Call()*** IBPP Message : Can't find/load FBCLIENT.DLL nor GDS32.DLL
faustf Posted June 12, 2012 Posted June 12, 2012 hi guy i try to connect whit dll at the db fire bird but autoit tell me C:\Program Files (x86)\AutoIt3\Include\FireBird.au3 (195) : ==> Subscript used with non-Array variable.: Return SetError($vRet[0] <> 0, 0, $vRet[0]) Return SetError($vRet^ ERROR why ?? (((
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now