PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Rashmi Anand <rashmi5 at yahoo dot com>
Subject: Error when checking "if exists"
Date: May 26 1998 4:57PM

Hello, 
I am trying to check for the existance of a row and if it exists, send
an update otherwise, send an Insert statement:

if exists (select * from ... where ...)
   begin 
     Update ... where ...
   end
else
   begin 
     Insert ...
   end

and I get the following error:

DB-Library error: Attempt to initiate a new SQL Server operation with
results pending.

I don't think the above SQL is returning any results, and I am not
expecting any, then why is dblib throwing the above error?

Any help will be appreciated.
Thanks in advance
--Rashmi




_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com