How can i execute sqlsrv_query function

I need to execute a query using sqlsrv_query function in SC-7.

For example :
/* Execute the query. agaunst SQL Server*/
$stmt = sqlsrv_query($conn, $tsql, $params);

How can i get the scriptcase Global connection variable to the Database $conn ?

Thanks in advance…

I think that should do it.

$serverName = [sc_glo_servidor];
$connectionInfo = array( “Database”=>[sc_glo_banco], “UID”=>[sc_glo_usuario], “PWD”=>[sc_glo_senha] );
$conn = sqlsrv_connect( $serverName, $connectionInfo);

jsb

You can too:
sc_lookup(qry, “SELECT * FROM TABLE”, “conn_mssql”)

where conn_mssql is the connection defined on SC.