Forum Discussion

whuang's avatar
whuang
Regular Contributor
6 years ago

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!