How can I get all records from a query?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I get all records from a query?
Hi there,
I got TC to run a query which returns more than one records, but when I used the codes below, it complained "Could not find stored procedure 'First'.", if I comment out this line, it complained on While Not DBConnection.EOF that "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.". Can someone please help me how I can get all the results from the list? Thanks in advance!
Set DBConnection = ADO.CreateConnection
DBConnection.ConnectionString = MyStringValue
DBConnection.Open
Set Result = DBConnection.Execute(QueryToRun)
DBConnection.First
While Not DBConnection.EOF
Log.Message(Result.Fields.Item(ColumnName).Value)
DBConnection.Next
Wend
DBConnection.Close
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
https://www.google.com/search?q=ado+recordset+iterate+records+vbscript
https://stackoverflow.com/questions/45619762/doing-stuff-for-each-record-in-a-recordset
http://www.vb-helper.com/howto_update_ado.html
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
never mind, I found the solutions here.
