SQL_Fetch not getting the info in the DB

Tags: SQL_Fetch

#1 YvanG

Hi, This is my sql_fetch command :

$Retval = sql_fetch("SELECT ServerName, Transmission FROM dbo.SrvAuth WHERE ServerName = ?", $MachineCourt);

This command does find the right record based on ServerName but it is always putting the second field, $Transmission, to the value FALSE.

Here is the MS SQL table definition : Colum Name Data Type Allow Nulls ServerName varchar(50) Unchecked Transmission bit Unchecked

Depending of the record that it is fetch, the DB contains about a third of TRUE and 2 third of FALSE for the Transmission field.

Question : Why do I always fetch FALSE for the Transmission field?

Thanks

#2 ArkadiyDeactivated Nxlog ✓
#1 YvanG
Hi, This is my sql_fetch command : $Retval = sql_fetch("SELECT ServerName, Transmission FROM dbo.SrvAuth WHERE ServerName = ?", $MachineCourt); This command does find the right record based on ServerName but it is always putting the second field, $Transmission, to the value FALSE. Here is the MS SQL table definition : Colum Name Data Type Allow Nulls ServerName varchar(50) Unchecked Transmission bit Unchecked Depending of the record that it is fetch, the DB contains about a third of TRUE and 2 third of FALSE for the Transmission field. Question : Why do I always fetch FALSE for the Transmission field? Thanks

Hello,

It's hard to say what's happening or advise something without your config. Don't you mind to paste it here?

Best regards, Arch