--- [EMAIL PROTECTED] wrote: > I'm successfully connecting to a Pervasive 7 database with my PERL program > when running from the command line. > > I try to run the program in my webbrowser and I get the following error. > > Error connecting to MO Error: [802] [] "[Pervasive Software][ODBC > Interface][Pervasive Software SQL Engine]General error." > > (MO is the name of my system DSN) > > any ideas how to fix this so it runs on the web server properly
While this is not the answer you seek, have you considered switching to DBI with the DBD::ODBC driver? This would give you several advantages: 1. It's portable. 2. Placeholders are supported. That, combined with DBD::OBDC's separate prepare and execute statements could let you do this: my $sql = 'SELECT firstName, lastName FROM table WHERE uid=?'; my $sth = $dbh->prepare( $sql ); foreach my $uid ( @uid ) { push @names, $sth->fetchrow_arrayref( $uid ); } Since the statement is already prepared, this is much faster than Win32::ODBC. 3. Notice I didn't use any error handling in step 2? (ignoring for the moment that I could have had an invalid $uid) DBI allows me to set RaiseError automatically, thus catching errors for me. For large applications, this is critical. 4. Win32::OBDC has no bind parameters. As a result, you can't specify a BLOB, for example. Forget about using binary data. 5. More programmers know DBI and thus can offer you better support. 6. DBI has the DBI->trace method, which is a godsend for debugging. Cheers, Curtis "Ovid" Poe ===== Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __________________________________________________ Do You Yahoo!? NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]