PHP ODBC参数化查询错误无法找到存储过程'sp_describe_undeclared_pa​​rameters'

时间:2017-11-07 06:44:57

标签: php sql sql-server odbc

我试图在PHP中使用ODBC参数化查询,但我得到了这个错误消息

Warning: odbc_execute(): SQL error: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Could not find stored procedure 'sp_describe_undeclared_parameters'., SQL state 37000 in SQLDescribeParameter in C:\xamppold\htdocs\poling\validate.php on line 99

Warning: odbc_execute(): SQL error: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Could not find stored procedure 'sp_describe_undeclared_parameters'., SQL state 37000 in SQLDescribeParameter in C:\xamppold\htdocs\poling\validate.php on line 100

我正在使用此代码:

$stmt1    = odbc_prepare($koneksi, 'INSERT INTO tb_pemilu (id_calon,id_status,nim_mhs,ip) values (?,?,?,?)');
                    $stmt2    = odbc_prepare($koneksi, 'INSERT INTO tb_pemilu (id_calon,id_status,nim_mhs,ip) values (?,?,?,?)');



                    $values1 = array($id_cln_senat, $id_sts_senat, $nima,$ipaddr);
                    $values2 = array($id_cln_balma, $id_sts_balma, $nima,$ipaddr);

                    $exec0 = odbc_execute($stmt1, $values1);
                    $exec1 = odbc_execute($stmt2, $values2);

0 个答案:

没有答案