🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
4 messages
4 total messages Started by Nirmal Shrestha Fri, 20 Apr 2001 18:21
Insert Data on Oracle
#679
Author: Nirmal Shrestha
Date: Fri, 20 Apr 2001 18:21
33 lines
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
Re: Insert Data on Oracle
#690
Author: Jerry Bloomfield (TeamB)
Date: Thu, 26 Apr 2001 02:38
21 lines
1994 bytes
On Fri, 20 Apr 2001 13:21:50 -0500, "Nirmal Shrestha" <nirmals@flowcal.com>
wrote:

>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.

There are problems with the Oracle ODBC drivers (and there are also
problems with the Microsoft ODBC drivers for Oracle databases too).  Quite
often,  you can resolve your problems with the Oracle drivers by making
sure that you always use UPPERCASE in your SQL syntax,  especially when
referring to field and table names.

Jerry Bloomfield (TeamB)
-- 
http://www.teamb.com                                      JersWork@wwa.com
Please do *NOT* send private e-mail without prior permission (my anti-spam 
filters will probably just delete it anyway <g>)
Re: Insert Data on Oracle
#692
Author: Nirmal Shrestha
Date: Fri, 27 Apr 2001 14:50
44 lines
2910 bytes
Mr. Bloomfield,

Thank you for your response. But I think the real problem is  BDE is not
registering  the Oracle tables. When I try to see the list of tables from
BDE Explorer, It does not show me the tables. For example, I have table
named Owner.System. And I can see list of tables Owner.S, Owner.Sy,
Owner.Sys, Owner.Syst, Owner.Syste, Owner.System, where there should only be
a table named Owner.System.  I can Query against the table using TQuery
object in the program or in Enter Sql window in BDE Explorer, but I can't
open the tables. When I double click on table name it says invalid table
name.

What do I need to do to see the Tables in BDE Explorer? Is there different
way to register database in BDE Explorer?  Is this known issue with Oracle?

Nirmal



Jerry Bloomfield (TeamB) <JersWork@wwa.com> wrote in message
news:de2fetg50gpgtbme882j9i2jlvvesjqhlt@4ax.com...
> On Fri, 20 Apr 2001 13:21:50 -0500, "Nirmal Shrestha"
<nirmals@flowcal.com>
> wrote:
>
> >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.
>
> There are problems with the Oracle ODBC drivers (and there are also
> problems with the Microsoft ODBC drivers for Oracle databases too).  Quite
> often,  you can resolve your problems with the Oracle drivers by making
> sure that you always use UPPERCASE in your SQL syntax,  especially when
> referring to field and table names.
>
> Jerry Bloomfield (TeamB)
> --
> http://www.teamb.com                                      JersWork@wwa.com
> Please do *NOT* send private e-mail without prior permission (my anti-spam
> filters will probably just delete it anyway <g>)
Re: Insert Data on Oracle
#697
Author: Jerry Bloomfield (TeamB)
Date: Sun, 29 Apr 2001 01:07
29 lines
2600 bytes
On Fri, 27 Apr 2001 09:50:55 -0500, "Nirmal Shrestha" <nirmals@flowcal.com>
wrote:

>Thank you for your response. But I think the real problem is  BDE is not
>registering  the Oracle tables. When I try to see the list of tables from
>BDE Explorer, It does not show me the tables. For example, I have table
>named Owner.System. And I can see list of tables Owner.S, Owner.Sy,
>Owner.Sys, Owner.Syst, Owner.Syste, Owner.System, where there should only be
>a table named Owner.System.  I can Query against the table using TQuery
>object in the program or in Enter Sql window in BDE Explorer, but I can't
>open the tables. When I double click on table name it says invalid table
>name.
>
>What do I need to do to see the Tables in BDE Explorer? Is there different
>way to register database in BDE Explorer?  Is this known issue with Oracle?

Try upgrading your ODBC drivers.  I had seen the exact same problem you
describe using Oracle v8.0.4.0 ODBC drivers,  and the problems were
resolved with an upgrade to Oracle v8.0.4.4 ODBC drivers.  I was able to
determine my problem was with the Oracle ODBC drivers by enabling the ODBC
tracing functionality and reading through the large (about 20MB) trace file
it created.  If you upgrade your ODBC driver,  your problems might be
resolved as well...

Jerry Bloomfield (TeamB)
-- 
http://www.teamb.com                                      JersWork@wwa.com
Please do *NOT* send private e-mail without prior permission (my anti-spam 
filters will probably just delete it anyway <g>)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads