Article View: borland.public.cppbuilder.database.multi-tier
Article #679Insert Data on Oracle
From: Nirmal Shrestha
Date: Fri, 20 Apr 2001 18:21
Date: Fri, 20 Apr 2001 18:21
33 lines
1829 bytes
1829 bytes
Hello,
I am trying to insert data into Oracle and it gives me Table not found. If I
use Insert statement and execSql it does insert fine. But If I use
sql = "select * from " + TableName("Company") + " where ID = :parm";
Query->RequestLive = true;
Query->SQL->Text = sql;
if (! Query)
return;
if (Query->Active)
return;
if (! Query->Prepared)
Query->Prepare(); //<--------------
Query->Open();
if (Query->State != dsEdit && Query->State != dsInsert
Query->Edit();
else
Query->Append();
Query->FieldByName(fld)->Value = value;
Query->Post();
It gives me an Oracle error, table does not exists. If I set
Query->RequestLive = false; it prepares the SQL statement and Opens the
table but do not lt me insert saying read only data set.
It was working fine with MS Access database, and I am having problem trying
to change it to access to Oracle database.
Nirmal
Technical Details
Message-ID:
<3ae07d90_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,ee60ef244642fb7d,start X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2001-04-20 11:44:06 PST From: "Nirmal Shrestha" <nirmals@flowcal.com> Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Insert Data on Oracle Date: Fri, 20 Apr 2001 13:21:50 -0500 Lines: 37 Organization: Flow-Cal, Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 216.89.39.12 Message-ID: <3ae07d90_1@dnews> X-Trace: dnews 987790736 216.89.39.12 (20 Apr 2001 11:18:56 -0700) Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews