piasek
7 years agoNew Contributor
Return general SQL Query results
Hi, I am trying to create a few methods handling my DB connection. What I need is a simple: SELECT * FROM TABLE result. The only help I could find is some CreateADOquery method, which seems to be very awkward to use, as all the examples include addressing specific columns. And I don't want to do that.
w.SQL = "SELECT VendorName FROM Vendors WHERE State = :Param_State"
w.Open()
w.First()
while not w.EOF:
Log.Message(w.FieldByName("VendorName").AsString)
w.Next()
The above example would be just right, except it requires FieldByName() method. What I am trying to get is query result as list of strings or array of strings.
The code is being developed in Python.