Change the sql to
my $sth = $dbh->prepare( "SELECT lkpver.text_string as
version,lkpst.text_string as status from release_target rt, lookup
lkpst, lookup lkpver where rt.product_issue_id = :1 and
lkpst.lookup_category_name = 'm2_release_target_status' and
lkpst.code_int = rt.status_lkp and lkpver.lookup_category_name =
'm2_fix_in' and lkpver.code_int = rt.fix_in_version_lkp");

You had no placeholder for the bind variable the variable $bfn would
have been evaluated at define time not execution time.

Ken.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 08 April 2004 18:50
To: [EMAIL PROTECTED]
Subject: Can't bind unknown placeholder '1' at
..site/lib/DBI/ProxyServer.pm line 329.


Hi Gurus,

Greetings!

My perl script is using the DBI 1.37 & DBD-ODBC 1.06 to connect from
Unix to our 
Windows SQL Server via Proxy. The SQL query that I am doing is very
simple. 

Here is the Query:

my $sth = $dbh->prepare( "SELECT lkpver.text_string as
version,lkpst.text_string as status from release_target rt, lookup
lkpst, lookup lkpver where rt.product_issue_id = $bfn and
lkpst.lookup_category_name = 'm2_release_target_status' and
lkpst.code_int = rt.status_lkp and lkpver.lookup_category_name =
'm2_fix_in' and lkpver.code_int = rt.fix_in_version_lkp");

$sth->execute($bfn);
 
while ( my $row = $sth->fetchrow_hashref) {
my $flag_no_row = 1;
$release_status = $row->{status}; 
$release_ID = $row->{version}; 

Any help/pointers to resolve this would be very much appreciated.

Thanks,
-Murali


Error Message from the dbi proxy server:

        Thu Apr  8 10:20:34 2004 debug, Accepting client
        Thu Apr  8 10:20:34 2004 debug, Client executes method
CallMethod
        Thu Apr  8 10:20:34 2004 debug, CallMethod: =>
DBI::ProxyServer::db=HASH(0x3a7e790),STORE,AutoCommit,1
        Thu Apr  8 10:20:34 2004 debug, CallMethod: <= 1
        Thu Apr  8 10:20:34 2004 debug, Client executes method
CallMethod
        Thu Apr  8 10:20:34 2004 debug, CallMethod: =>
DBI::ProxyServer::db=HASH(0x3a7e790),prepare,SELECT lkpver.text_string
as version,lkpst.text_string as status from release_target rt, lookup
lkpst, lookup lkpver where rt.product_issue_id  = 83481 and
lkpst.lookup_category_name = 'm2_release_target_status' and
lkpst.code_int = rt.status_lkp and      lkpver.lookup_category_name =
'm2_fix_in' and lkpver.code_int =
rt.fix_in_version_lkp,,ARRAY(0x3a77934)

        Thu Apr  8 10:20:34 2004 debug, CallMethod died with: Can't bind
unknown placeholder '1' at
//eops1/netperl/site/lib/DBI/ProxyServer.pm line 329.

        Thu Apr  8 10:20:34 2004 debug, Client executes method
DestroyHandle
        Thu Apr  8 10:20:34 2004 debug, Child terminating.


Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.

Reply via email to