SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2002
    Location
    edison
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Database Check Example

    Could you please any one can give a simple database connection example (connection string, execute query....) complete example with all the real time parameters.

    I am getting somany problems while test the database.
    Really thankfull to for your answers.

    -Kulkarni.


    ------------------
    rk2000
    rk2000

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Sheffield, Yorkshire England
    Posts
    88
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Database Check Example

    I am assuming that you have set up your DSN. If not do that first. Then the following should work. You will need to change the DSNNAME to the name of your DSN, and the sql query will need to connect to your table. Other then that it will work

    # This connects to the database.
    db_connect("Access Session", "DSN=DSNNAME");

    # Define the Query
    query="SELECT count(*) FROM [Table Name]";

    # Execute the Query
    db_execute_query("Access Session", query, record_num);

    # Disconnect from the database
    db_disconnect("Access Session");

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

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Location
    edison
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Database Check Example

    Thanks, now it is working and i am able to acess the data.

    I want to write some exceptions in each stage, ex: while connecting to db, in the record session...
    Is any one have the exceptions, please give me.

    Thanx in advance.



    ------------------
    rk2000
    rk2000

  4. #4
    Member
    Join Date
    May 2002
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Database Check Example

    See the db return values in the tsl reference guide.

    Simon

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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 04:08 PM.

Copyright BetaSoft Inc.