Forum Discussion

LohaniNisha's avatar
LohaniNisha
New Contributor
12 years ago

Firebird Database Testing

Hello,



My application runs with Firebird db. In current task i need to fire queries and check and compare the results.

Please let me know how do i connect to the db and execute the task.

Just to let you know that i am using Flamerobin to work on application database.



Thanks,

Nisha

  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi Nisha,

    I found one page for the same , hope this helps.

    I have never worked with firebird DB.




    IBProvider Professional Edition is the set of COM-components that allows working with any version of Firebird and Interbase. The components are supported by most development tools: Delphi, C++ Builder, Visual C++, .Net Framework, C#, Visual Basic, VBScript, VBA and others.






    http://www.ibprovider.com/eng/documentation/firebird.html



  • Thanks, but i had already all these.

    but i am not able to get what connection string i need to use to connect to db.



    Nisha.
  • Thanks for the reply. I had already visited the links and followed the steps.

    The main issue is that when i have setup the Firebird Client (i have NetProvider for Firebird) on my system I do not find it listed under available Drivers section under ODBC data connection and i think which is creating the problem.
  • Hello Nisha,

     

    The below code snippet it might help you. By the way which DB you are using,Is it SQL Server 2008/2005 or Oracle 10g/11



    Function DatabaseConnection()

    {


    //create ADO connection and Record set objects



    objConnection = Sys.OleObject("ADODB.Connection");



    objRecordset = Sys.OleObject("ADODB.Recordset");



    param_record_set = Sys.OleObject("ADODB.Recordset");



    var connectionString = "Data Source=PCACODBS08;Initial Catalog=DatabaseName;User ID=TestComplete;Password=testcomplete;Provider=SQLOLEDB ";//Setup the connection parameters  // Catalog=DatabaseName-->This is the name of DB, you will  get on DB Server



    objConnection.Open(connectionString);



    objRecordset.Open("Select Top 3 * from dbo.Main_Table where TC_HOST= 'TC_HOST' and in_use = 0 and is_active = 1", objConnection,adOpenStatic, adLockOptimistic,adCmdText);



    --------------;



    }



    Regards,

    Kumar


  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Nisha,



    ODBC has no idea about .Net, that is why its provider is not listed in the list of available drivers.

    I would recommend IBprovider (free, from http://www.ibprovider.com/) which worked for me.

    Its ADO connection string looks like this:

    Provider=LCPI.IBProvider.3.Free;Password=<pwd>;Persist Security Info=True;User ID=<userID>;Location=<server>:<full path to .fdb relative to server>;auto_commit=True;dbclient_library=fbclient.dll;dbclient_type=fb2.0