Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: DBI SQL error messages

by rjberry (Novice)
on Oct 06, 2008 at 09:14 UTC ( [id://715535]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI SQL error messages
in thread DBI SQL error messages

Thanks, you're right, I was just hoping there'd be an easier way to do it from Perl itself, if you see what I mean? Having to open Access every time is a pain (esp. as I'm not very familiar with it). Looks like that's the only error message I'll get from Perl though.

I tried writing the query into Access normally and it changes it into something bizarre:

INSERT INTO tblCustomer ( LastName, BranchID, FirstName, Premise, Street, District, Town, County, PostCode ) SELECT 'a' AS Expr1, 'b' AS Expr2, 'c' AS Expr3, 'd' AS Expr4, 'e' AS Expr5, 'f' AS Expr6, 'g' AS Expr7, 'h' AS Expr8, 'i' AS Expr9;

The select thing seems slightly ridiculous. I wonder if that's just because the way the GUI works or whether Access databases themselves don't understand Values().

But anyway, that works. Thanks for your help.

Replies are listed 'Best First'.
Re^3: DBI SQL error messages
by Narveson (Chaplain) on Oct 06, 2008 at 16:36 UTC
    I wonder if that's just because the way the GUI works

    That's right. If you bypass the GUI (what Access calls Design View), you can run an INSERT ... VALUES statement against an Access database, just as DBI does.

    Ask the GUI to display what you just did, and it converts the VALUES list to a SELECT clause without a FROM clause. If you don't want to see this happen, stay in SQL view.

      Hiya, I've found out what it is actually. There's nothing wrong with my SQL, it's instead to do with how MSAccess treats its version of Text fields, which is Memo fields. For some reason it's not really compatible with DBI. There's a post about it here, although their fix didn't work for me, sadly.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://715535]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-23 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found