
sam001
Novice
Apr 18, 2011, 1:36 AM
Post #1 of 2
(12297 views)
|
problem inserting into memo field Invalid precision value (SQL-HY104)
|
Can't Post
|
|
Hi, I read though an XML file and then insert values into an access database. It all works fine until I have to insert a large text into the memo field. I get this error. I've attached part of my code which works unless the text is large. DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver]Invalid precision value (SQL-HY104) I found this link which says its a known issue but I don't know how to resolve this. Please can someone help? http://search.cpan.org/dist/DBIx-Class/lib/DBIx/Class/Storage/DBI/ODBC/ACCESS.pm Thanks Sam I found a solution to iserting memo fields, just bind the variables and specify formats before inserting. However I'm still having problems with inserting dates $sth->bind_param(1,$rowdata{0},&{"DBI::SQL_VARCHAR"}); $sth->bind_param( 2, $rowdata{1}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 3, $rowdata{2}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 4, $rowdata{3}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 5, $rowdata{4}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 6, $rowdata{5}, &{"DBI::SQL_DATE"}); $sth->bind_param( 7, $rowdata{6}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 8, $rowdata{7}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 9, $rowdata{8}, &{"DBI::SQL_VARCHAR"}); $sth->bind_param( 10, $rowdata{9},&{"DBI::SQL_DATE"}); $sth->bind_param( 11, $rowdata{10},&{"DBI::SQL_DATE"}); $sth->bind_param( 12, $rowdata{11}, &{"DBI::SQL_LONGVARCHAR"}); $sth->execute;
(This post was edited by sam001 on Apr 18, 2011, 9:29 AM)
|