Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: ODBC

by BlueBlazerRegular (Friar)
on Apr 30, 2002 at 21:16 UTC ( [id://163164]=note: print w/replies, xml ) Need Help??


in reply to ODBC

Well, without knowing the exact error, this is all guessing, but here goes:

Does the 15th entry in the array get translated into a SQL-like piece of code? For example, if the 15th entry was something like: SELECT agreement.Field2 FRM agreement then your actual command would end up looking like this: SELECT agreement.Field2 FROM agreement WHERE (((agreement.Field1)=SELECT agreement.Field2 FRM agreement)) and it would/should blow up on the 'FRM'. Admittedly, this is a unlikely example, but anything in your array entry that looks like SQL might be parsed by Access as SQL, and therefore cause a SQL syntax error. Or worse, actually be executed (imagine putting a DROP TABLE agreement in the URL).

Or - I don't use Win32::ODBC (I prefer DBI), but "Programming the Perl DBI" mentions that Win32::ODBC doesn't use statement handles, but rather uses the database handle to process the SQL command. It also goes on to state that database handles can be cloned (although it doesn't explain how that happens). In your example you create a database handle via $qry = new Win32::ODBC('support_agreement_DSN');. You then use that database handle each time you do a new query. If Win32::ODBC is actually 'cloning' that database handle each time you create a new SQL statement, you could be running out of database handles.


Those are my thoughts on the subject.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-24 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found