silvano Posted August 8, 2007 Posted August 8, 2007 hi, can i add my elaborated query result in to array? and can i count total records in the query result? $q.execute( "select COUNTRY_NAME from countries WHERE COUNTRY_ID='UK'", $conn ) While not $q.EOF MsgBox(0, "Result", "COUNTRY = " & $adors.Fields("COUNTRY_NAME") .Value) ; elaborate the result ; add to array $q.MoveNext WEnd $conn.close _arrayDisplay() than you
Zedna Posted August 8, 2007 Posted August 8, 2007 As far as I know Execute is for stored procedures. Try to use $adors.Open() Resources UDF ResourcesEx UDF AutoIt Forum Search
silvano Posted August 8, 2007 Author Posted August 8, 2007 As far as I know Execute is for stored procedures.Try to use $adors.Open()adors.open don't work... execute work very good, but my problem is to return # of filed and _arrayAdd value
Will66 Posted August 9, 2007 Posted August 9, 2007 hi, can i add my elaborated query result in to array? and can i count total records in the query result? $q.execute( "select COUNTRY_NAME from countries WHERE COUNTRY_ID='UK'", $conn ) While not $q.EOF MsgBox(0, "Result", "COUNTRY = " & $adors.Fields("COUNTRY_NAME") .Value) ; elaborate the result ; add to array $q.MoveNext WEnd $conn.close _arrayDisplay() than you can i add my elaborated query result in to array? you need to create a recordset: $Rec = ObjCreate("ADODB.Recordset"); $SQL = "select COUNTRY_NAME from countries WHERE COUNTRY_ID='UK'" $Rec.Open( $SQL, $conn ); $myNew2DimensionalArray = $Rec.GetRows() and can i count total records in the query result? $recCount =$Rec.RecordCount
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now