SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2001
    Location
    NY, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DB Tester and Excel

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by mansri:
    Hi Levaks,
    I have been using Excel spreadsheet successfully.

    Here it's the INSERT syntax that works for me.

    handle hDB = DB_Connect ("dsn=Excel Files;DBQ=C:\segue\test.xls")
    String sSQL = "INSERT INTO `Results$` (Query,Records) VALUES ('test',20)"
    handle hSql = DB_ExecuteSql (hDB, sSQL)
    DB_FinishSQL(hSql)

    Here it's the UPDATE statment

    handle hDB = DB_Connect ("dsn=Excel Files;DBQ=C:\segue\test.xls")
    String sSQL1 = "Update `Results$` set Records=100 where Query = 'test'"
    handle hSql = DB_ExecuteSql (hDB, sSQL1)
    DB_FinishSQL(hSql)

    <HR></BLOCKQUOTE>


    Hi mansri,

    Could you explain what Results$, Query, Records in the Insert statement above mean? I tried your insert statement as it is, and I get the following error:

    [ ] *** Error: (HY000) [Microsoft][ODBC Excel Driver] Syntax error in query. Incomplete query clause.
    [ ] Occurred in DB_ExecuteSql
    [ ] Called from t at frame.inc(6)

    can you explain the syntax of select, insert, update and delete sqls?

    Thanks
    Srikanth

    ------------------
    Habit 1 - "Be Proactive"
    "The 7 Habits of Highly Effective People" by Stephen R. Covey

    [This message has been edited by Srikanth (edited 09-25-2001).]

  2. #2
    Member
    Join Date
    May 2001
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DB Tester and Excel

    Hi Srikanth,

    'Results' is name of the sheet. (I renamed sheet1 as Results)

    and Query,Records are the column names.

    Silk treats Excel as a oracle database.You can execute sql statments.

    For more information search this form.You will find other details. (How to setup DSN connection etc..)

    I am using silk5.0.3.1.

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


    [This message has been edited by mansri (edited 09-25-2001).]

  3. #3
    Member
    Join Date
    Jul 2001
    Location
    NY, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DB Tester and Excel

    Thanks... it worked!!

    Srik

    ------------------
    Habit 1 - "Be Proactive"
    "The 7 Habits of Highly Effective People" by Stephen R. Covey

 

 

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 03:52 AM.

Copyright BetaSoft Inc.