D
Domenico Discepola
Hello all. Some of my insert statements fail with the following error: SQL
Statement failed: [105] [1] [0] "[Microsoft][ODBC SQL Server Driver][SQL
Server]Unclosed quotation mark before the character string '(555)
555-5200'."
I'm using Microsoft SQL Server 2000 as my database server. What's funny is
that if I copy/paste the exact sql statement into my query tool (Query
Analyzer), the statement executes with no problems.
My sql statement (printed 1 field per line for clarity):
insert into dw.dbo.dim_customer values
( 24988 ,
'15937' ,
'Company X' ,
'Active',
'8C8BAB33D7CF59E1852562A50022F25E',
'City',
'Prospect',
'(555) 555-5200 (800) 555-7887',
'01/06/2004 10:24:19',
'01/06/2004',
'10:24:19' ,
'Company',
'Galvanizing',
null,
'',
'Person1',
'[Location]',
'Person 2',
'Person 3',
'Person 4',
null,
'08/05/2003',
'11:37:44',
'AM',
1,
3
)
Any thoughts as to why Win32::ODBC returns an error when I execute this
using the Sql method:
if ($g_dbhandle->Sql($SqlStatement)){
$stmt = $g_dbhandle->Error();
print "SQL Statement failed: ${stmt}\n";
$g_dbhandle->Close();
print "${SqlStatement}\n";
exit;
}
TIA
Statement failed: [105] [1] [0] "[Microsoft][ODBC SQL Server Driver][SQL
Server]Unclosed quotation mark before the character string '(555)
555-5200'."
I'm using Microsoft SQL Server 2000 as my database server. What's funny is
that if I copy/paste the exact sql statement into my query tool (Query
Analyzer), the statement executes with no problems.
My sql statement (printed 1 field per line for clarity):
insert into dw.dbo.dim_customer values
( 24988 ,
'15937' ,
'Company X' ,
'Active',
'8C8BAB33D7CF59E1852562A50022F25E',
'City',
'Prospect',
'(555) 555-5200 (800) 555-7887',
'01/06/2004 10:24:19',
'01/06/2004',
'10:24:19' ,
'Company',
'Galvanizing',
null,
'',
'Person1',
'[Location]',
'Person 2',
'Person 3',
'Person 4',
null,
'08/05/2003',
'11:37:44',
'AM',
1,
3
)
Any thoughts as to why Win32::ODBC returns an error when I execute this
using the Sql method:
if ($g_dbhandle->Sql($SqlStatement)){
$stmt = $g_dbhandle->Error();
print "SQL Statement failed: ${stmt}\n";
$g_dbhandle->Close();
print "${SqlStatement}\n";
exit;
}
TIA