SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    pt
    pt is offline
    Member
    Join Date
    Feb 2001
    Location
    US
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    connection to database on linux

    can someone help me .... i need to connect to the database on linux & i am running my scripts on win98. the database is postgres & i have the drivers & all installed. i am unable to connect to the database using my script.

    please reply ASAP

    Thanks very much
    P.T.
    P.T.

  2. #2
    pt
    pt is offline
    Member
    Join Date
    Feb 2001
    Location
    US
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: connection to database on linux

    hi ....

    I am looking for the answer to the query that i have posted above .... can some one help me with that ..... if i am not clear then please ask ? what u want to know

    thx
    P.T.
    P.T.

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: connection to database on linux

    Well, the first thing to check is that you can connect to the database from your W98 machine at all. Try some tool like ODBCTest (versions available both from Oracle and from Microsoft) or SQLTest (Oracle). I am sure that many other simple odbc clients exist out there, with which you can confirm that your odbc datasource has been set up correctly.
    Secondly, check that your connection string is correct (I don't know the database type in question, but it will be something like "DSN=<datasourcename>", possibly with extra bits to include the username and password your logging on as, maybe other stuff also). Just mess around with different variations of this connect string (elements in different order, adding and removing different elements etc.) to see if anything crops up.
    The other thing to remember is that when silktest tries to connect to the database, it does so through the Host machine, not the Target machine. Make sure your odbc datasource is set up correctly and working on the machine where silktest is installed, not an a separate machine with just the agent (if you have one).

    I haven't had any problems connecting to a database that wasn't sorted out by these checks. Then again I've never tried to use postgres.

  4. #4
    Senior Member
    Join Date
    Jan 2000
    Location
    Chicago, Illinois, USA
    Posts
    151
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: connection to database on linux

    I am not sure what the question is, but postgress has an ODBC driver currently it is located at
    ftp://ftp.postgresql.org/pub/odbc/index.html
    I had no chance to try it but if it works with from ODBC Datasource Administrator it should work from Silk Test script.

    Can you tell what exactly happening when you trying to create ODBC Data Source.

  5. #5
    pt
    pt is offline
    Member
    Join Date
    Feb 2001
    Location
    US
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: connection to database on linux

    i have got the connection ..... thanx for the help but now i am not able to terminate the connection. i am using the DB_disconnect statement but i am getting the error ...

    ---------------------------------------------

    [-] Testcase DBTest - 1 error
    [ ] *** Error: (08001) Already connected.
    [ ] Occurred in DB_Connect
    [ ] Called from DBTest at tester.t (9)

    ---------------------------------------------

    my script is .......

    [-] testcase DBTest () appstate none
    [ ]
    [ ] // This test uses the functions in DBTester
    [-] // to directly access an ODBC database
    [ ] INTEGER previd, NEWID
    [ ] HDATABASE hdbc
    [ ] HSQL hstmnt
    [ ] // connect to Postgres database "data"
    [ ] hdbc = DB_Connect ("dsn=base")
    [ ]
    [ ] // retrieve info from Department table
    [ ] hstmnt = DB_ExecuteSql (hdbc, "SELECT COUNT (*) FROM users")
    [ ]
    [ ] // process the information that came back
    [ ] hstmnt = DB_ExecuteSql (hdbc, "select * from user")
    [-] // release resources (unneeded really
    [ ] // because immediately followed by disconnect)
    [ ] DB_FinishSQL (hstmnt)
    [ ]
    [ ] // disconnect
    [ ] DB_Disconnect (hdbc)


    please let me know if there is something that i am missing

    thx
    P.T.


    [This message has been edited by pt (edited 03-19-2001).]

    [This message has been edited by pt (edited 03-19-2001).]
    P.T.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:58 PM.

Copyright BetaSoft Inc.