DataAdapter and Oracle - UpdateStatement Error

From: Franklin M. Gauer III (FranklinMGauerIII_at_discussions.microsoft.com)
Date: 03/23/05


Date: Wed, 23 Mar 2005 13:51:04 -0800


I just want to post an observation we have had here during development.

We are using Oracle 8i and we are starting to use Visual Studio .NET to
build our data adapters for us. When we build our dataadapters we have found
that if you use oracle field names larger than 21 characters you will receive
errors in the SQL statements (i.e. update & delete).

The reason being is that Visual Studio, in order to implement record
concurrency checking, prefixes the field names in the SQL statements with
':ORIGINAL_'. When this happens on a field greater than 21 characters it
returns an Oracle error. This error occurs at runtime when you try to execute
either an update or delete on a dataadapter via the UPDATE method.

So just be aware of this and you will have better luck with this type of
processing. We actually ripped out all of the concurrency checking (on the
data adapter SQL statements) on a project just because we couldn't figure out
why we were getting the Oracle errors. We thought it had something to do with
the NULL statements that Visual Studio generates when creating the SQL
statements.

It turns out that it has nothing to do with the NULL checking. This works
great. It's the size of your Oracle Field names.

I am posting this in hopes that it saves someone some time and frustration
out there!

Thanks!

-- 
Franklin M. Gauer III
Lead .NET Architect
Honeywell Defense Avionics


Relevant Pages

  • Re: Long Discussion Re Relational
    ... To explain what I mean I'll use Visual Studio and Oracle as an equivalent... ... > For OSMOSiS, the BASIC editor, file manager, and system admin tools ... > What you're saying though is that this should come from the MV vendor. ...
    (comp.databases.pick)
  • Re: Does Optimizer use P.A.T to calculate cost..?
    ... hints to the SQL statements to essentially force Oracle to use index ... I want to move away from using the 'old' method of manually specifying ... Some of those SQL statements that I brought over ... likely resulting in multi-pass sorts. ...
    (comp.databases.oracle.server)
  • Re: IMP-00058: ORACLE error 1017 encountered (invalid username/password)
    ... I am trying to IMPORT the dump into an Oracle 10g on Solaris 10. ... IMP-00058: ORACLE error 1017 encountered ... Are you doing anything remote from the server? ... import done in US7ASCII character set and UTF8 NCHAR character set ...
    (comp.databases.oracle.server)
  • Re: Modelling objects with variable number of properties in an RDBMS
    ... >> Oracle supports maximum 1000 columns. ... > I have a set of SQL statements suitable for IBM Informix Dynamic Server ... > the only limit out there - there are higher limits. ...
    (comp.databases.theory)
  • Re: Does Optimizer use P.A.T to calculate cost..?
    ... Scan through the trace file and look for the wait events ... I rely on NOWORKLOAD system statistics - the default behaviour. ... hints to the SQL statements to essentially force Oracle to use index ... Some of those SQL statements that I brought over ...
    (comp.databases.oracle.server)