I am new to Vbscript (3 days to be precise),
I am connecting my script to SQL Server and playing around with databases. I have connected successfully
Now here's what I want to do:
I want to store the value of SELECT COUNT(*) FROM TABLE_A in a variable to be used in VBscript.
This SQL query returns the number of rows in table and it is an integer, but how do I return it and save in a variable?
I tried this:
Dim VARX
SET VARX = connection.execute("SELECT COUNT(*) FROM TABLE_A")
So now VARX should contain the number of rows of TABLE_A.
But this is a wrong way I know. And of course It posts an error "TYPE Mismatch:". Please guide me!