How can I retrive data from ADO database?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I retrive data from ADO database?
Hi Support,
I had a script to run database query with no problem, but now I need to retrive data after running the query, I am not sure how to do that. I have the code below working as expected, but after the execution line, I added "Log.Message(DBConnection.Fields.Item("OrderStatusDateTime").Value)", but it doesn't work, the query returns only 1 column 1 value, can someone please tell me how I can do it?
Set DBConnection = ADO.CreateConnection DBConnection.ConnectionString = XXXXXX DBConnection.Open DBConnection.Execute(QueryToRun)
Thanks!
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nevermind, it is working now
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This is because you do not preserve returned result (if any) - https://www.w3schools.com/asp/met_conn_execute.asp.
Also https://docs.microsoft.com/en-us/sql/ado/reference/ado-api/execute-method-ado-connection?view=sql-se... and other ADO documentation provided by Microsoft.
/Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
