SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 1999
    Location
    San Jose, CA, usa
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DBTest with FetchNext

    Hello,
    I am trying to generate a FetchNext
    list of fieldname parameters on the fly and am unsure how to do this. The SQL query table and field names get generated by reading in fields from an INI file.
    I don't know the number of fields until I read in the INI file, therefore I don't know the number of fields the fetchnext needs to hold. If I have too many fields FetchNext errs out.
    It reads something like this, but I need to generate it on the fly

    DB_FetchNext (mydata, a[n],a[n+1], a[n+2],
    a[n+3],a[n+4],)
    print ("a{n}: {a[n]}, a{n+1}: {a[n+1]}, a{n+2}: {a[n+2]}, a{n+3}: {a[n+3]}, a{n+4}: {a[n+4]}")
    where the a[n] field names may be ID, COST, QUANTITY in one query, and they may be
    url, company, address, city, state, zip, price in another query, so I need to generate the fetchnext field list on the fly. The Fields may be from 1 15 depending on the table.
    Suggestions???
    Thanks,
    STeve


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

  2. #2
    Member
    Join Date
    Jun 2001
    Location
    Bedford, MA, USA
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DBTest with FetchNext

    Steve,

    Pass a LIST variable to DB_FetchNext. It will hold however many columns as are specified in the select statment of the query.


    What will you do with the values you retrieve from the database? What is the broader problem you are trying to solve?

    - Jim


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

 

 

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.