SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Mar 2001
    Posts
    161
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sql query with Multi recordset

    User (patrick_albaret@yahoo.com.nospam) posted:

    Hi,

    I need to execute some Sql sentence and some ruturns 2 recordset.

    Ex with SQL Server 2000:
    SELECT type, price, advance
    FROM titles
    WHERE type LIKE '%cook'
    ORDER BY type
    COMPUTE SUM(price), SUM(advance) BY type

    With SilkTest 5.5 Sp1, I retrieve values of only the first Recordset.

    Is anybody as an idea to retrieve values of the 2nd recordset.

    thanks

    Patrick



  2. #2
    bjc
    bjc is offline
    Member
    Join Date
    Jan 2000
    Location
    CT
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sql query with Multi recordset

    try using DB_FetchNext
    ------------------

  3. #3
    Junior Member
    Join Date
    Jul 2001
    Location
    Paris
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sql query with Multi recordset

    thanks for your reply, but I tryed your code and I obtain only the result of the first recordset, and It's the 2nd recordset which is important for me.

    Actually I use a workaround with an Exe in VB and the filesystem:
    My Vb Code:
    Set cn = CreateObject("ADODB.Connection")
    cn.Provider = "sqloledb"
    cn.Properties("Data Source") = MySqlServer
    cn.Properties("user ID") = "sa" cn.Properties("password") = ""
    cn.Open
    Set rs = CreateObject("ADODB.recordset")
    Set rs = cn.Execute(sSql)
    nbRecordSet = 1
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fFile = fso.OpenTextFile(sSourceFile, ForWriting)
    While Not rs Is Nothing
    'nouveau recordSet
    fFile.WriteLine ("[RecordSet_" & nbRecordSet & "]")
    nbField = rs.Fields.Count()

    While (Not rs.EOF)
    sLine = ""
    i = 0
    While i < nbField
    sLine = sLine & sItem & "|"
    'Debug.Print rs(i).Type
    i = i + 1
    Wend
    fFile.WriteLine (Trim(sLine))
    rs.MoveNext
    Wend
    'change recordset
    Set rs = rs.NextRecordset
    nbRecordSet = nbRecordSet + 1
    fFile.WriteLine ("")
    Wend
    fFile.Close


    Patrick


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

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

    Re: Sql query with Multi recordset

    Is it possible to split your query into two separate queries, which the db_tester functions will be able to handle correctly?

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

  5. #5
    Junior Member
    Join Date
    Jul 2001
    Location
    Paris
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sql query with Multi recordset

    What is DB_Tester?

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

  6. #6
    Member
    Join Date
    Feb 2001
    Location
    New York, NY
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sql query with Multi recordset

    Check your Silk Help.
    In the Search field enter "DB".

    ------------------
    -Lev Aks
    lev_aks@in-nyc.com

 

 

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:27 AM.

Copyright BetaSoft Inc.