Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2003
    Posts
    24

    Exclamation Unanswered: 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

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: I can't create a PROCEDURE dynamically with Oracle DB

    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?

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

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

  5. #5
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Here is the Oracle documentation for ORA-00911:

    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.

  6. #6
    Join Date
    Jan 2003
    Posts
    24
    This is the SQL Command:

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

    Thanks.

  7. #7
    Join Date
    Jan 2003
    Posts
    24
    This is the SQL Command:

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

    Thanks.

  8. #8
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    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...

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •