SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Sep 2001
    Location
    Somerset, NJ 08873
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: list of record type

    User Green, Jeffrey (Jeffrey) (jeffreygreen@avaya.com.nospam) posted:

    That did the trick

    Thanks


  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Hartford, CT, USA
    Posts
    163
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: list of record type

    User Jaimini Bhatt (jaiminita@yahoo.com.nospam) posted:

    1. Initialise both the fields at the time of declaring like how David Genrich has mentioned
    leExpectedData = { }
    2.EXPECTRECORD erExpectedData // to instantiate the record type into object
    3. Use this. to fetch the read-reacord and then populate the list of record....

    -Jaimini Bhatt
    ----- Original Message -----
    From: David Genrich
    To: 'jeffavaya' ; silktest@yahoogroups.com
    Sent: Thursday, January 10, 2002 12:37 PM
    Subject: RE: [silktest] list of record type


    You didn't include what your actual query was.

    You should have a query something like:

    sSQLStatement = "select VALUE, RESULT from myTable"

    Then, when you gather the data:

    leExpectedData = {} // make sure the list is empty

    while (DB_FetchNext (hstmnt, laExpected))
    ListAppend (leExpectedData, laExpected)


    Hope this helps,

    David Genrich


    Jaimini Bhatt

  3. #3
    Member
    Join Date
    Sep 2001
    Location
    Somerset, NJ 08873
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    list of record type

    User jeffavaya (jeffreygreen@avaya.com.nospam) posted:

    I have a question regarding record types. I have a defined a
    record type as the following

    type EXPECTRECORD is record
    STRING sValue
    STRING sResult

    In my function a define the following
    LIST OF EXPECTRECORD leExpectData
    LIST OF ANYTYPE laExpected

    Then I retrieve the following from the database

    while (DB_FetchNext(hstmnt, laExpected))

    My problem is I want to append from the laExpected use
    into the EXPECTRECORD list. I am a bit unsure how you would do that

    Any assistance, would be appreciated

    Jeff



  4. #4
    Senior Member
    Join Date
    Mar 2001
    Posts
    161
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: list of record type

    User David Genrich (David.Genrich@e2open.com.nospam) posted:

    You didn't include what your actual query was.

    You should have a query something like:

    sSQLStatement = "select VALUE, RESULT from myTable"

    Then, when you gather the data:

    leExpectedData = {} // make sure the list is empty

    while (DB_FetchNext (hstmnt, laExpected))
    ListAppend (leExpectedData, laExpected)


    Hope this helps,

    David Genrich



  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: list of record type

    User John Green (jwgreen@automationexpertise.com.nospam) posted:

    EXPECTRECORD er

    Don't use laExpected in the DB_FetchNExt statement, use er. If the
    select statement has two strings, it will load the record correctly.

    Send more code for more assistance.

    John



  6. #6
    Member
    Join Date
    Sep 2001
    Location
    Somerset, NJ 08873
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: list of record type

    User Green, Jeffrey (Jeffrey) (jeffreygreen@avaya.com.nospam) posted:

    When I try and do as you suggested I get the following error

    [ ] *** Error: Type mismatch -- Variable for column 1 should be
    a STRING
    [ ] Occurred in DB_FetchNext
    [ ] Called from retrieve_sap at sap.inc(28)
    [ ] Called from newinstall at newinstall.t(24)

    Here is my code
    [-] type EXPECTRECORD is record
    [ ] STRING sValue
    [ ] STRING sResult
    [-] retrieve_sap(SAPRECORD rSAPData)
    [ ] // Declarations
    [ ] LIST OF ANYTYPE laExpected
    [ ] HSQL hstmnt6
    [ ] LIST OF EXPECTRECORD leExpectData
    [ ] // Get expected results for new install
    [ ] sSQL = "select e.Value, n.Result from NewInstallExpect n,
    ExpectCodes e "
    [ ] sSQL += "where e.ExpectCodeID = n.ExpectCodeID"
    [ ] hstmnt6 = DB_ExecuteSQL(htestDB, sSQL)
    [-] while (DB_FetchNext(hstmnt6, leExpectData))
    [ ] ListPrint(leExpectData)

    Thanks
    Jeff

  7. #7
    Senior Member
    Join Date
    Mar 2001
    Posts
    161
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: list of record type

    User David Genrich (David.Genrich@e2open.com.nospam) posted:

    Try the following:

    [-] type EXPECTRECORD is record
    [ ] STRING sValue
    [ ] STRING sResult
    [ ]
    [-] retrieve_sap(SAPRECORD rSAPData)
    [ ] // Declarations
    [ ] EXPECTRECORD leExpected // changed to a record, not a list of
    anytype
    [ ] HSQL hstmnt6
    [ ] LIST OF EXPECTRECORD leExpectData = {}
    [ ]
    [ ] // Get expected results for new install
    [ ] sSQL = "select e.Value, n.Result from NewInstallExpect n, ExpectCodes e
    "
    [ ] sSQL += "where e.ExpectCodeID = n.ExpectCodeID"
    [ ] hstmnt6 = DB_ExecuteSQL(htestDB, sSQL)
    [ ]
    [ ] // use the record type here, as John Green mentioned
    [-] while (DB_FetchNext(hstmnt6, leExpected))
    [ ] ListPrint(leExpected)
    [ ] ListAppend (leExpectData, leExpected)




 

 

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 05:57 AM.

Copyright BetaSoft Inc.