Converting a client from Sybase to Oracle?

From: Alfred von Campe <alfred_at_hw.stratus.com>
Date: 1997/02/26
Message-ID: <5f21sm$e08_at_transfer.stratus.com>#1/1


[Quoted] [Quoted] How easy would it be to convert a program that uses the Sybase DBlib interface to use Oracle? I might be faced with the task to do this in the near future, and since I have never used Oracle (and from the little I have seen it looks completely different than Sybase), I have no idea how long it would take me to do this.

Note that I am not concerned (at least not as far as this post goes) about converting the actual database (i.e., the tables) from Sybase to Oracle. My main concern is to convert the client. Here a small excerpt from one of our many (hundreds of) queries:

dbfcmd(db1,"select distinct %s.spn, spn_body.body ",gbl_parts_table);
dbfcmd(db1,"from %s, spn_body, bodyprop ",gbl_parts_table);
dbfcmd(db1,"where %s.spn = spn_body.spn ",gbl_parts_table);
dbcmd(db1,"and spn_body.body = bodyprop.body "); dbcmd(db1,"and bodyprop.property = 'SCANLINK' "); dbsqlexec(db1);
dbresults(db1);
dbbind(db1, 1, NTBSTRINGBIND, 0, spn);
dbbind(db1, 2, NTBSTRINGBIND, 0, body_name);

while (dbnextrow(db1) != NO_MORE_ROWS)
  {
  <snip>
  }

[Quoted] What would the above code look like if I were using an Oracle DB? If that is too much to ask, can someone post a similar code fragment but using an Oracle API?

Thanks,
Alfred

P.S. I have cross-posted this to both Sybase and Oracle newsgroups.

-- 
+--------------------------------------------------------------+

| Ma-Bell: H: 508.448.6214, W: 508.490.6306, fax: 508.460.2888 \
| US Mail: Alfred von Campe, 402 Lowell Road, Groton, MA 01450 \
| Internet: alfred_at_hw.stratus.com \
+------------------------------------+-----------------------------+
[Quoted] [Quoted] | Why is common sense so uncommon? | I'd rather be flying N4381Q |
+------------------------------------+-----------------------------+
Received on Wed Feb 26 1997 - 00:00:00 CET

Original text of this message