neoPhpExecSql Two parameters and SqlServer - Forum

Forum Navigation
You need to log in to create posts and topics.

neoPhpExecSql Two parameters and SqlServer

Hello, I need your help, please......

I have a select statement with two parameters:

$sqlAlias[9]="selectanalisis";
$sqlQuerys[9]="SELECT DISTINCT NumAnalisis FROM Analisis Where CodSku=?1 and NumLote=?2 ";
$sqlMaxUserLevel[9]=-1;

and the call as: neoPhpExecSql "Ark" "selectanalisis" "[CodeSku4]::[selected4L]" "parseanalisis"

With SqlServer it doesn´t return any data. However, if I use only a single parameter it works perfectly:

$sqlQuerys[9]="SELECT DISTINCT NumAnalisis FROM Analisis Where CodSku=? ";

neoPhpExecSql "Ark" "selectanalisis" "[CodeSku4]" "parseanalisis"

OR

$sqlQuerys[9]="SELECT DISTINCT NumAnalisis FROM Analisis Where NumLote=? ";

neoPhpExecSql "Ark" "selectanalisis" "[selected4L]" "parseanalisis"

 

With 2 parameters it works with SQLite but not with SqlServer. The datatypes for both columns is Varchar(100) in SqlServer and TEXT in SQLite.

 

@egodyla your SQL query is not a valid one, try this instead:

SELECT DISTINCT NumAnalisis FROM Analisis WHERE CodSku=? AND NumLote=?

Regards