----- Forwarded message from Dan Wilga <[EMAIL PROTECTED]> -----

Delivered-To: [EMAIL PROTECTED]
Date: Thu, 29 May 2003 16:27:02 -0400
To: [EMAIL PROTECTED]
From: Dan Wilga <[EMAIL PROTECTED]>
Subject: DBI::ProxyServer 0.3005 (1.37)

Hi there,

I would have posted this to perl.dbi.dev, but my news server doesn't 
carry it :-(.

I'm having a problem with $dbh->execute() and do() that you may be 
able to help with.

Here's the setup:

Client:
Perl 5.8.0 (RedHat Linux 8)
DBI 1.37
DBD::Proxy 0.2004

Server:
Perl 5.8.0 (Activestate, Windows NT)
DBI 1.37
RPC::PlServer 0.2016
Using a MS SQL Server 7 DSN

When I run a "do" or "execute" that alters data in the DB, I get the 
following error:

Failed to execute method CallMethod: Describe failed during 
DBI::ProxyServer::st=HASH(0x1071abd8)->FETCH(NUM_OF_FIELDS) at 
c:/Perl/site/lib/DBI/ProxyServer.pm line 287.

Interestingly, if I use "execute" to get the results from a stored 
procedure, it works fine. It only fails when making an update.

Looking at ProxyServer.pm line 287, it's:

      my $NUM_OF_FIELDS = $sth->{NUM_OF_FIELDS};

within sub prepare().

It's almost as though, since there is no data being returned by the 
statement, DBI is confused when trying to calculate the number of 
fields. The statement being executed is:

$sth = $dbh->prepare( q{usp_update_user @username='dwilga',
                        @this_username='foobar',
                        @last_name='Last',
                        @first_name='First',
                        @middle_name='A.',
                        @department_id='theat#afram####',
                        @user_groups='####Chair##Dept###Orig#',
                        @old_this_username='foobar'} );
$sth->execute();

Incidentally, this same code has worked for a long time with 
DBD::ODBC and Openlink's iodbc MS SQL drivers.

-- 
Dan Wilga                                         [EMAIL PROTECTED]
Web Technology Specialist                     http://www.mtholyoke.edu
Mount Holyoke College                                Tel: 413-538-3027
South Hadley, MA  01075                                        "Oook."

----- End forwarded message -----

Reply via email to