Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can this even be done through ADO for Oracle???

Re: Can this even be done through ADO for Oracle???

From: Gary <noyfb_at_kma.com>
Date: Thu, 30 Sep 1999 16:27:08 -0700
Message-ID: <fjSI3.3529$Xy3.5654@client>


Thanks Steve but I have figured it out on my own.

When using the 'Microsoft OLE DB Provider for ODBC' Provider, the SQL statement fails
with the following Error in the ADO Errors Collection.

"[Oracle][ODBC][Ora]Trigger, procedure or function created with PL/SQL compilation error(s)."

If I use the 'Microsoft OLE DB Provider for Oracle' Provider the statement executes successfully.

I am not sure why this is but I am satisfied with this solution. I would have preferred to use the
ODBC provider because my application need the ability to switch between MS Access, MS SQL Server, and Oracle backends. Easy enough, I will just include the Provider
as a variable in the ConnectString property.

Thanks,
Gary

Steve Jorgensen wrote in message <1aQI3.608$k57.18326_at_news1.teleport.com>...
>Can you run a trace to see what is actually being sent to Oracle? Perhaps
>ADO is adding something to the beginning or end of the statement that is
>causing it to fail.
>
>
>Gary wrote in message ...
>>HI All,
>>
>>I am trying to send a "Create Function" statement through ADO to an
>>Oracle Database.
>>
>>The Function gets created but it has Compiler Errors. If I use SQL Plus
>>to execute the same statement it is successfull with no errors.
>>I can execute the following statements through ADO with no problems.
>>
>>CREATE TABLESPACE
>>CREATE TABLE
>>CREATE USER
>>GRANT
>>ALTER
>>
>>I cannot however Create Procedures, Functions or Triggers through ADO.
>>If I do I have to go into them using an Oracle Tool such as
>>Enterprise manager to view and edit the code and Apply the changes
>>even if no changes are needed to successfully compile the code.
>>I know the code is Syntacticly correct because I can get the function to
>>process using SQL PLUS, SQL Worksheet, & Enterprise Manager.
>>
>>Here is an example:
>>
>>Create or Replace Function GAGETEST.Whatserver
>>Return Integer IS
>>BEGIN
>>Return(1);
>>END;
>>
>>This works fine with the oracle tools but not through ADO.
>>
>>Any suggestions would be helpfull
>>
>>Gary
>>
>>
>>
>
>
Received on Thu Sep 30 1999 - 18:27:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US