Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

DBD_ODBC 1.21 does not accept DBI::SQL_LONGVARCHAR as data type anymore?

by taioba (Acolyte)
on Jun 01, 2009 at 01:31 UTC ( #767154=perlquestion: print w/replies, xml ) Need Help??
taioba has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Monks. Like many I have struggled with trying to insert data in Access memo fields using DBI. Some of you have kindly explained how to do that in the posting below:

I used to be able to insert info in memo fields in my Access database by binding the data using DBI::SQL_LONGVARCHAR. However, every since I upgraded DBD-ODBC to version 1.21, everytime I try to do that I get:

DBD::ODBC::st bind_param failed: Microsoft ODBC Microsoft Access Driver Invalid precision value (SQL-HY104)

If I use the column_info method to get the data type of the memo field, I get LONGCHAR instead of LONGVARCHAR. That does not work either, and I get the same message. Interesting enough, I do not have this problem if the data been inserted is smaller than 255 characters, even if it is a memo field. I also can insert data without a problem in INTEGER or VARCHAR fields. Any ideas?

Thanks for your ever wise and kind guidance.

  • Comment on DBD_ODBC 1.21 does not accept DBI::SQL_LONGVARCHAR as data type anymore?

Replies are listed 'Best First'.
Re: DBD_ODBC 1.21 does not accept DBI::SQL_LONGVARCHAR as data type anymore?
by mje (Curate) on Jun 01, 2009 at 10:22 UTC

    Create a self-contained small example in perl and post on under DBD::ODBC and I will look into it.

        This is technically a bug in DBD::ODBC since it does not follow the DBI specification in making parameter types sticky. However, an easy workaround for now is simply to leave the binding in the code but remove the data from the execute call.

        A proper fix is available in DBD::ODBC 1.21_1 which will appear on CPAN shortly.

Re: DBD_ODBC 1.21 does not accept DBI::SQL_LONGVARCHAR as data type anymore?
by Anonymous Monk on Jun 01, 2009 at 09:06 UTC
      If I downgrade to the previous version, I get this "Out of memory" error when trying to query the database. Upgrading fixed this problem, but created a new one. I am familiar with that posting, I have a couple of scripts running that used to work along those lines until I upgraded DBD-ODBC.

        The out of memory error is known and fixed in 1.21 but you seem to have another issue. There is a report on now (perhaps that was you) and I will look into it tomorrow. Watch the rt and I'll post back here once I've looked at it.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://767154]
Approved by randyk
[Corion]: :-D
Corion discovers a new shiny toy to try out over the (longish) weekend. Since I've done some more with websockets, maybe I'll try writing a webserver that implements hot-reloading of HTML(+CSS, +Javascript) in the browser. Edit the local file and ...
[Corion]: ... the browser(s) get a ping to a) refresh the page or b) reload "just" the changed parts, keeping the scroll position etc.
[Corion]: But I also have to look at how I can make WWW::Mechanize:: RemoteBrowser a reality, and how to make it safe from malicious content ;)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2018-04-26 10:45 GMT
Find Nodes?
    Voting Booth?