Results 1 to 4 of 4

Thread: QTP script using Multiple Line SQL query

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Answers
    3

    QTP script using Multiple Line SQL query

    I have a multiple line SQL query to put in my QTP script. How can I keep the query in a multiple line format int the (QueryStr="") instead of one single line?


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: QTP script using Multiple Line SQL query

    Hi Joseph,

    Use the line continuation character '_' and continue your query on the next line.

    Cheers...


  3. #3
    Junior Member
    Join Date
    Dec 2007
    Answers
    3

    Re: QTP script using Multiple Line SQL query

    Thank you for replying

    I tried it and it did not work for me. Can you provide me with an example?

    thank you


  4. #4
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: QTP script using Multiple Line SQL query

    Hi Joseph,

    Here is an example of a line in my code -

    objRecordset.Open "SELECT * FROM Hardware" , objConnection, _
    adOpenStatic, adLockOptimistic

    Set colSoundCards = GetObject("winmgmts:").ExecQuery ("Select * from RelationsTable _
    where RelationID is not null")

    Cheers....


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact