Hi, I am trying to understand how to use DBCommand() properly.
I use the example provided in the function to base my test:

 Code:
$sql = "select * from USERS where UserID = 'test'"
$dsn ='Provider=SQLNCLI;Server=bp-sys-01;Database=audits_netlogon;Trusted_Connection=yes;'
$recordset = DBCommand($dsn,$sql)
? 'Error = '+@ERROR+' - '+@SERROR

for $row=0 to ubound($recordset,1)
	for $column=0 to ubound($recordset,2)
		? 'Field(row='+$row+', column='+$column+') ='+$recordset[$row,$column]
	next
next


The error code I get is this: -2147352567

I know my $sql statement works, because I tried it directly in SQL Server Management Studio and it returns data.

For the $dsn connection string, I tried it with DBConnOpen() and it works ok.