If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > I can't create a PROCEDURE dynamically with Oracle DB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-03, 08:41
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
Exclamation I can't create a PROCEDURE dynamically with Oracle DB

Hi!
I can't create a PROCEDURE dynamically with Oracle DB. I'm using ADO 2.7. But it works perfectly from SQL+.
What is wrong?

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-21-03, 10:56
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: I can't create a PROCEDURE dynamically with Oracle DB

Quote:
Originally posted by nmoreno
Hi!
I can't create a PROCEDURE dynamically with Oracle DB. I'm using ADO 2.7. But it works perfectly from SQL+.
What is wrong?

Thanks
I'm not sure I understand what you are tring to do here. Do you mean you want to do a CREATE PROCEDURE command via ADO? Not sure why you would be wanting to do that, but anyway... what error message do you get?
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 01-21-03, 11:03
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
Yes, I want to execute a CREATE PROCEDURE via ADO / OLEDB.

The error message is: ORA-00911: invalid character.
Reply With Quote
  #4 (permalink)  
Old 01-21-03, 11:05
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
Yes, I want to execute a CREATE PROCEDURE via ADO / OLEDB.

The error message is: ORA-00911: invalid character.
Reply With Quote
  #5 (permalink)  
Old 01-21-03, 11:22
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Here is the Oracle documentation for ORA-00911:

Quote:
ORA-00911 invalid character

Cause: Special characters are valid only in certain places. If special characters other than $, _, and # are used in a name and the name is not enclosed in double quotation marks ("), this message will be issued. One exception to this rule is for database names; in this case, double quotes are stripped out and ignored.

Action: Remove the invalid character from the statement or enclose the object name in double quotation marks.
If you still can't see what the cause of this error is, post the SQL command string that you are trying to run.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #6 (permalink)  
Old 01-21-03, 11:31
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
This is the SQL Command:

CREATE OR REPLACE FUNCTION
nrmVersionNKB
RETURN INT IS
BEGIN
RETURN 200;
END;

Thanks.
Reply With Quote
  #7 (permalink)  
Old 01-21-03, 11:33
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
This is the SQL Command:

CREATE OR REPLACE FUNCTION
nrmVersionNKB
RETURN INT IS
BEGIN
RETURN 200;
END;

Thanks.
Reply With Quote
  #8 (permalink)  
Old 01-21-03, 11:47
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Quote:
Originally posted by nmoreno
This is the SQL Command:

CREATE OR REPLACE FUNCTION
nrmVersionNKB
RETURN INT IS
BEGIN
RETURN 200;
END;

Thanks.
Can't see any problem with that. Can you post the actual version that is in your code? I mean the one that looks more like:

strSQL = "CREATE OR REPLACE FUNCTION ...."

Maybe the problem lies there...
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #9 (permalink)  
Old 01-21-03, 13:21
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
Thank you Tony.

I am working in oledb (ATL). I got "Invalid character" error because I didn't convert the string from ANSI to UNICODE. Now it works.

Thanks.
Reply With Quote
  #10 (permalink)  
Old 01-21-03, 13:23
nmoreno nmoreno is offline
Registered User
 
Join Date: Jan 2003
Posts: 24
Thank you Tony.

I am working in oledb (ATL). I got "Invalid character" error because I didn't convert the string from ANSI to UNICODE. Now it works.

Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On