List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:August 21 2002 6:27pm
Subject:Re: Not sure which list to use - this is a real strange one with ODBC
View as plain text  
Why use odbc when native drivers are available?

Norris, Joseph wrote:

>Groups,
>
>I have this snippet of code:
>
>$dbh = DBI->connect( "dbi:ODBC:${db_name}", "$user", "$pass")
> or &DoError("Unable to connect: $DBI::errstr"); 
>
>#$dbh->debug(2);
>
>$fsql = qq!select empl_no_a, user_ln, user_fn, user_mi, aka, 
>   longname_a, longname_b, longname_c, useaka from activeempsinfo!; 
>
>$db_action = $dbh->prepare($fsql);
>$db_action->execute or &DoError("could not do $fsql - $DBI::errstr ");
>
>The resource is set up for odbc as a system dsn it is setting on another
>drive and I have a batch file running the script that contains the code
>above which does the following:
>
>@echo off
>net use h: /delete
>net use h: \\mcdsssql\hrdata
> 
>Then runs my script.
>
>OK - here is the problem:
>the execute above dies with the following error:
>
>panic: dbd_error on bad handle type at update_from_hr.pl line 48.
>
>However when I allow the debug statment above - it spews all of its debug
>infor and the script finishes successfully and updates what it is supposed
>to.
>
>ANY IDEAS?????? - very perplexing.
>
>Thanks.
>


Thread
Not sure which list to use - this is a real strange one with ODBCJoseph Norris21 Aug
  • Re: Not sure which list to use - this is a real strange one with ODBCGerald Clark21 Aug
RE: Not sure which list to use - this is a real strange one with ODBCJoseph Norris21 Aug
  • Re: Not sure which list to use - this is a real strange one with ODBCGerald Clark21 Aug
  • RE: Not sure which list to use - this is a real strange one with ODBCJeff Urlwin22 Aug