Losing connection to server during query

2006-11-10 Thread john1
Lo all, We have recently just moved the db from a socket connection on the same machine to a port connection on another machine. The network is a LAN. I'm getting this error: Unable to connect to database:DBI connect('database=tm;host=mysqldb;port=3307','tm',...) failed: Lost connection to

RE: Bind variable question

2006-11-10 Thread Ronald J Kimball
Reidy, Ron [mailto:[EMAIL PROTECTED] wrote: Your statement only has one bind variable (?). The other bind variable is actually a Perl variable. Your execute will fail because of this. However, there is another issue. You cannot substitute bind variables in this manner. Your attempt to

RE: Bind variable question

2006-11-10 Thread Berlage, Steve
Thanks guys! I got it to work by using an array and dropping the \. Ron, I should have mentioned that I'm using MySQL, so I don't think SGA will be an issue. I will keep your warning in mind though. Thanks again all. Steve -Original Message- From: Jonathan Leffler [mailto:[EMAIL

DBI in a web context

2006-11-10 Thread Robert Hicks
I have a couple forms for an in-house application. The user fills out the fields and then submits which update a back end Oracle database. I have looked for examples but can't really find anything. How is it best to catch errors when doing DBI stuff in web applications? Wrap the insert code

Re: DBD::ADO and Access IMAGE (OLE Object) fields...

2006-11-10 Thread amonotod
Resending because it's been several hours and I haven't seen this show up yet... Hello all, Sometimes it is just more sensible to find a workaround rather than a solution. So, here is an updated script that uses DBI::ADO to create the database, DBI::ODBC to populate and test it, and

Re: DBI in a web context

2006-11-10 Thread Robert Hicks
In my case I would probably report and return. Easy enough to do for what I am dong. Robert Reidy, Ron wrote: I would definitely wrap the entire transaction in an eval {}. But, I'm not sure if I would croak/die when a failure occurs vs. report the error and go back. rr -Original

Re: DBD::ADO and Access IMAGE (OLE Object) fields...

2006-11-10 Thread amonotod
Hello all, Sometimes it is just more sensible to find a workaround rather than a solution. So, here is an updated script that uses DBI::ADO to create the database, DBI::ODBC to populate and test it, and DBI::ADO to retrieve the pics via CGI. Thanks for the pointer, Bart! As before, the

Possible Problem with bind_param

2006-11-10 Thread David Wu
Hi all, I came across some funny behavior in Perl with the DBI package, and I don't know how to explain it or why it is happening. I've tried googling it, but haven't found anything yet. Here is the scenario: I have some code that automatically tries to update a user's email address if

RE: Possible Problem with bind_param

2006-11-10 Thread CAMPBELL, BRIAN D (BRIAN)
Here's a guess, as I'm not familiar with your particular Database and DBD. It looks like the DBD is treating your value as in integer. Perhaps the DBD looks at the first part of the string, and thinks, here's a number, so I'll pass an integer type to the database engine. Suggestion: try

Re: Possible Problem with bind_param

2006-11-10 Thread David Wu
Hi Philip, Yes, $dbh-{RaiseError} is set to 1. I have the code surrounded in an eval that does a rollback if there is an error, or a commit if there is no error. The code is committing and the query is being executed, just not with the value I expect. Thanks, Dave On Nov 10, 2006, at

Re: Possible Problem with bind_param

2006-11-10 Thread David Wu
Hi Brian, Thanks for the suggestion. I thought that might be the case as well, and I've already tried adding the type attribute as a varchar, but there was no change. Dave On Nov 10, 2006, at 4:31 PM, CAMPBELL, BRIAN D (BRIAN) wrote: Here's a guess, as I'm not familiar with your

RE: Possible Problem with bind_param

2006-11-10 Thread Garrett, Philip \(MAN-Corporate\)
FWIW, I tested a simple SELECT ? with your '[EMAIL PROTECTED]' value against my Postgres 7.2 (DBD::Pg 1.21). It bound fine and returned the correct value. David Wu wrote: Hi Brian, Thanks for the suggestion. I thought that might be the case as well, and I've already tried adding the type