How can I retrive data from ADO database?
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)
Solved! Go to Solution.
Nevermind, it is working now
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.