> Can you wrap it up in a small example, showing the issue? new config: dbi - 1.34 dbd-odbc 1.04
old config: dbi - 1.34 dbd-odbc .43 or lower when i run the below code on the new config i get these errors: C:\>perl\scripts\recent_claim_data_test.pl DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Invalid cursor state (SQL-24000)(DBD: dbd_describe/SQLNumResultCols err=-1) at C:\perl\scripts\ recent_claim_data_test.pl line 51. DBD::ODBC::st fetchrow_array failed: (DBD: no select statement currently executi ng err=-1) at C:\perl\scripts\recent_claim_data_test.pl line 53. when i run it on the old config, there are no errors. if i remove "use eggsupp;" it runs without errors. note i have the system dsns configured the same way on separate boxes using the same default databases, ecmaster. i've noticed in some other scripts that when you remove the "use ...." you get errors indicating "invalid object name" under the new config... #!perl.exe -w use DBI; use strict; ################################################################################# # # # THIS SCRIPT EXECUTES A QUERY THAT RETURNS PAYOR, CUSTOMER, AND FILE. # # A FEW STATES ARE THEN FILTERED OUT, AND THE RESULTS ARE THEN PRINTED # # TO A TEXT FILE # # # ################################################################################# ##### my's my ($dbh, $sth); ##### open file my $file = "c:\\data\\recent_claim_data.txt"; open (TEXT, ">$file") || die "Can't Open $file: $!\n"; ######## open db my $dbname = 'ECmaster'; my $user = 'elala'; my $passwd = 'Rlala'; # connect to database $dbh = DBI->connect("dbi:ODBC:$dbname", $user, $passwd) or die $dbh->errstr; # set data size and ok to truncate $dbh->{LongReadLen} = 10000; $dbh->{LongTruncOk} = 1; ### Query my $sql = " use ecmaster SELECT distinct substring(filename,1,4) as Payor,substring(filename,charindex('-',filename,9)+1,4) as Customer ,max(createdtime) as LastFileDate FROM masterfile WHERE substring(filename,1,4) like '[a-z][a-z][a-z][0-9]' AND FILENAME LIKE '%.CLM' anD DateDiff(day,createdtime,getDate())<14 and filename like '%tst%' group by substring(filename,1,4),substring(filename,charindex('-',filename,9)+1,4) order by substring(filename,1,4) "; $sth = $dbh->prepare($sql); $sth->execute(); while(my @now = $sth->fetchrow_array) { my $payor = $now[0]; my $cust = $now[1]; my $lfd = $now[2]; print "$payor\t$cust\t$lfd\n"; print TEXT "$payor, $cust, $lfd\n"; } ######### disconnect $sth->finish; $dbh->disconnect; ###### close file close(TEXT) || die "can't close $file\n"; --- Jeff Urlwin <[EMAIL PROTECTED]> wrote: > > > > --- Jeff Urlwin <[EMAIL PROTECTED]> wrote: > > > Is it logging in the same way as the prior version? > > > > > > > yes, seems to be the same. > > Can you wrap it up in a small example, showing the issue? > > I've got some time to work on DBD::ODBC this week and would like to get > it > done, if it's something I can do. > > Thanks, > > Jeff > > > > > > > > > > > > > > > > > > > hello everyone, > > > > > > > > i recently downloaded the latest version of perl which came > > > > with the following that i installed via the ppm. > > > > new: > > > > activestate perl 5.6.1 > > > > ppm 2.20 > > > > dbi 1.34 > > > > dbd odbc 1.04 > > > > > > > > old: > > > > activestate perl 5.6.1 > > > > ppm 2.1.6 > > > > dbi 1.27 > > > > dbd odbc .28 > > > > > > > > the below code runs fine on my older version but gets crazy > > > > errors on the new versions. can anyone help me solve the > > > > problems. i'd like to run the latest versions, if possible :) > > > > > > > > perl code: > > > > > > > > my $sql = " > > > > SELECT distinct substring(filename,1,4) as > > > > Payor,substring(filename,charindex('-',filename,9)+1,4) > > as Customer > > > > ,max(createdtime) as LastFileDate > > > > FROM masterfile > > > > WHERE substring(filename,1,4) like > > > > '[a-z][a-z][a-z][0-9]' AND FILENAME LIKE '%.CLM' anD > > > > DateDiff(day,createdtime,getDate())<14 > > > > and filename like '%tst%' > > > > group by > > > > substring(filename,1,4),substring(filename,charindex('-',filen > > > > ame,9)+1,4) > > > > order by substring(filename,1,4) > > > > "; > > > > > > > > $sth = $dbh->prepare($sql); > > > > $sth->execute(); > > > > > > > > > > > > ------------ > > > > > > > > errors: > > > > DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server > > > > Driver][SQL Server]Inv alid object name 'masterfile'. > > > > (SQL-42S02) [Microsoft][ODBC SQL Server Driver][SQL > > > > Server]Statement(s) could not be prepare d. (SQL-42000)(DBD: > > > > st_execute/SQLExecute err=-1) at C:\perl\scripts\recent_clai > > > > m_data.pl line 65. DBD::ODBC::st fetchrow_array failed: (DBD: > > > > no select statement currently executi ng err=-1) at > > > > C:\perl\scripts\recent_claim_data.pl line 88. > > > > > > > > > > > > > > > > > > > > __________________________________________________ > > > > Do you Yahoo!? > > > > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your > > > > desktop! http://platinum.yahoo.com > > > > > > > > > > > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Tax Center - File online, calculators, forms, and more > http://platinum.yahoo.com > > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://platinum.yahoo.com