CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
what does this error message mean

 



datlaravi
Deleted

Jun 14, 2000, 9:01 AM

Post #1 of 5 (713 views)
what does this error message mean Can't Post

I was calling a subroutine which adds data to the database and it is giving this error
Database error. OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (155) Message String: ct_send(): user api layer: external error:
This routine cannot be called when the command structure is idle.

The subroutine i have is
sub addConf {
$ConfName = $query->param('Conference_name');
$value =$query->param('location');
$select = "select location from ConferenceRooms where conferenceRoomId =$value";
$sybHandle =$syb->prepare($select);
$sybHandle->execute();
my ($loc) = $sybHandle->fetchrow)
$location = $loc;
$insert = "insert into ConferenceRooms (location,conferenceRoomName) values ('$location','$ConfName')";
$sybHandle=$syb->prepare($insert);
$sybHandle->execute() | | &writeError('Conference Room cannot be added');
$rc = $sybHandle->finish();
$message = "<b>Conference Room Added</b><p>";

}
Please help me


dws
Deleted

Jun 14, 2000, 11:40 AM

Post #2 of 5 (713 views)
Re: what does this error message mean [In reply to] Can't Post

Try setting your query parameters after preparing the query.


datlaravi
Deleted

Jun 14, 2000, 1:19 PM

Post #3 of 5 (713 views)
Re: what does this error message mean [In reply to] Can't Post

I am sorry,i didn't get it. How do i set the query parameters after the query?


dws
Deleted

Jun 14, 2000, 2:51 PM

Post #4 of 5 (713 views)
Re: what does this error message mean [In reply to] Can't Post

D'oh. Never mind, I misread your code.

Have you been able to isolate which call to Sybase is causing this error?




Kanji
User / Moderator

Jun 14, 2000, 3:34 PM

Post #5 of 5 (713 views)
Re: what does this error message mean [In reply to] Can't Post

Judicious use of debugging in your code would help immensely in tracking down where the error is happening so that you can fix it.

ie, <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

$sth = $dbh->prepare($select)
&#0124; &#0124; die( "Can't prepare: ", $dbh->errstr );

$sth->execute
&#0124; &#0124; die( "Can't execute: ", $sth->errstr );

my( $loc ) = $sth->fetchrow
&#0124; &#0124; die( "Can't fetchrow: ", $sth->errstr );

etc. ...</pre><HR></BLOCKQUOTE>

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives