Received: from mail.rdc1.md.home.com (imail@ha1.rdc1.md.home.com [24.2.2.66]) by hub.org (8.9.3/8.9.1) with ESMTP id UAA36043 for ; Thu, 22 Apr 1999 20:04:30 -0400 (EDT) (envelope-from phitau@home.com) Received: from maestro ([24.4.131.253]) by mail.rdc1.md.home.com (InterMail v4.00.03 201-229-104) with ESMTP id <19990423000425.TRMN29499.mail.rdc1.md.home.com@maestro> for ; Thu, 22 Apr 1999 17:04:25 -0700 Message-Id: <4.2.0.32.19990422193209.00a42e60@mail.hwrd1.md.home.com> X-Sender: phitau@mail (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.32 (Beta) Date: Thu, 22 Apr 1999 19:39:18 -0400 To: mailto: From: Paul E Stephens Subject: Replacing PREPARE Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Hello all, I have been given some C code that contained some of Oracle's SQL calls. One of the types of call is a fetch that uses the PREPARE command. I am having trouble coming up with a work around and would appreciate any suggestions. Code snip: sprintf( query, "SELECT first, second FROM table_name where %s = %s", value1, value2 ); EXEC SQL PREPARE :select_str USING :query; EXEC SQL DECLARE my_cursor CURSOR FROM :select_str; EXEC SQL OPEN my_cursor; EXEC SQL FETCH FORWARD 1 IN my_cursor INTO :value1, :value2; Thanks in advance, Paul E Stephens