// Store Procedure
CREATE proc calum_select_mcf_patient
(@piuid varchar(64) = '1%',
@domain_ref int = 1131)
as
select * from mcf_patient
where patient_instance_uid like @piuid
and domain_ref = @domain_ref
return
GO
// SQL Client Library
#include <sqlfront.h>
#include <sqldb.h>
// C Program
DBCHAR piuid[64]="'1%'";
...
if (dbrpcparam(dbproc, "@piuid", (BYTE)NULL, SQLVARCHAR, 64, 64, (BYTE *)piuid) == FAIL)
{
printf("dbrpcparam failed.\n"
dbexit();
exit(ERREXIT);
}
...
/* Print any rows that may have been returned. */
dbprrow(dbproc);
...
Program runs but no result returns back, any insight? I tried the fourth and fifth parameter as (-1, 64), (-1, 4) also, none of them works.
(When I run calum_select_mcf_patient '1%' in SQL QA it's fine)
Thanks,
Calum
CREATE proc calum_select_mcf_patient
(@piuid varchar(64) = '1%',
@domain_ref int = 1131)
as
select * from mcf_patient
where patient_instance_uid like @piuid
and domain_ref = @domain_ref
return
GO
// SQL Client Library
#include <sqlfront.h>
#include <sqldb.h>
// C Program
DBCHAR piuid[64]="'1%'";
...
if (dbrpcparam(dbproc, "@piuid", (BYTE)NULL, SQLVARCHAR, 64, 64, (BYTE *)piuid) == FAIL)
{
printf("dbrpcparam failed.\n"
dbexit();
exit(ERREXIT);
}
...
/* Print any rows that may have been returned. */
dbprrow(dbproc);
...
Program runs but no result returns back, any insight? I tried the fourth and fifth parameter as (-1, 64), (-1, 4) also, none of them works.
(When I run calum_select_mcf_patient '1%' in SQL QA it's fine)
Thanks,
Calum