Hi all,
I'm new to COM programming, and am trying to understand how to implement in KiXtart.

I'm attempting to attach to a SQL server, run a query, and return an integer value as the result of the query.

What works:
I successfully connect to the database:
$objConnect = CreateObject("ADODB.Connection")
$objConnect.Open("$CONNECTION_STRING")

I then run my query with a SQL statement:
$objRec = $objConnect.execute("SELECT COUNT(*) AS REC_COUNT FROM tablename WHERE field = 'N'")

What doesn't work:
$objRec should contain the integer result of the query, right? Wrong! it appears as a longish number (15239064 or some such) - not what I expected. An equivalent VB script returns a value of 4 or 5 for the same query.

Does anyone have insights on how I should get my integer value?

Thanks in advance!
MarkR