SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    May 2001
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with DB_FetchNext.

    Hi Silk users,
    I am trying to insert data in the excel file using DB_fetchNext. I have return an insert statement for this. The main thing is the inserted value has decimal. (Ex: 1234.8). When I ran the script I got the following

    Invalid use of '.', '!', or '()'. in query expression '1234.8'.

    Why am I getting this? Any Suggestions.
    Very ******.

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem with DB_FetchNext.

    Hi,

    If you are trying to insert data into the database then you need to use DB_ExecuteSql rather than DB_FetchNext. DB_FetchNext returns the next record that is returned from the SQL query.

    hstmnt = DB_ExecuteSql (hdbc, "INSERT INTO tblMyTable VALUES ('...', '...', '1234.8', '...');")

    I hope that this helps.

    John.


    ------------------
    John O'Neill.
    Quality Automation Ltd. www.quality-automation.com
    A member of Global Quality Alliance

    [This message has been edited by John O'Neill (edited 05-16-2001).]
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  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: Problem with DB_FetchNext.

    What is your full query?
    Have you tried running your query from somewhere other than silktest?
    I recommend using a tool like odbctest, where you can quickly and easily test your sql queries outside silktest; it always takes a long time to debug sql queries hard-coded into silktest scripts, because there is no compile-time checking of the syntax etc. So using a different tool to work out what is wrong with the query is very useful I find.
    I have posted my copy of odbctest in the downloads section (under General), because the oracle and microsoft websites don't seem to allow people to download it anymore. Should appear there soon.

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

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

    Re: Problem with DB_FetchNext.

    John
    I am using 'while' Loop using DB_FetchNext.


    [This message has been edited by mansri (edited 05-16-2001).]

 

 

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 12:31 PM.

Copyright BetaSoft Inc.