I have a problem with perl DBI bind_param. The following SQL works:
my $sth = $dbh->prepare("SELECT id FROM table WHERE id = 'string'"); $sth->execute();
So far the following:
my $sth = $dbh->prepare("SELECT id FROM table WHERE id = ?"); $sth->execute('string');
Last query error: [ODBC SQL Server Driver][SQL Server]The data types nvarchar(max) and ntext are incompatible in the equal to operator. (SQL-42000) [ODBC SQL Server Driver][SQL Server]The data types nvarchar(max) and ntext are incompatible in the equal to operator. (SQL-42000) .
It seems that bind_param , which is called by execute , returns 'string' in ntext. How can I get around this?
source share