Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Posts
    7

    Unanswered: New To Pervasive

    Hello.

    I would like some help on simple stored procedures. Here is some of the code that I am using as a test....

    CREATE PROCEDURE emp_sp(in:empID char(4)) AS
    BEGIN
    SELECT * FROM EMPLOYEE WHERE E_ID = empID;
    END;
    CALL emp_sp('2269')

    This generates a "No Such Table or Object" error. Any help would be great.

    Regards,
    darrellj

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    First, you need to change the procedure to include a RETURNS clause to return the data you are SELECTing. As it stands, it would not return any data.
    Second, you need to make sure there's an "EMPLOYEE" table in the database you are using. THe error indicates there isn't one.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Jan 2007
    Posts
    7

    New To Pervasive Question.

    I have altered the stored procedure to include a RETURNS statement. I have also made sure that there was a table named "EMPLOYEE". I am still getting this error "No such Table or Object". Am I missing something in my stored proc syntax?

    Regards,
    Darrell

  4. #4
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    And what do you get if you issue:
    SELECT * FROM EMPLOYEE WHERE E_ID = '2269'

    As a second test, what happens if you create and then execute the following SP:
    create procedure GetTable()
    RETURNS (TableName char(20));
    begin
    select xf$name from x$file;
    end;

    call GetTable()
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  5. #5
    Join Date
    Jan 2007
    Posts
    7

    Thanks For The Reply

    I copied and pasted your sample code into the stored proc window and tried to save the procedure. I received the same message.....

    Save Failed:com.pervasive.psql.utilities.core.DBExcepti on:
    [LNA][Pervasive][ODBC Engine Interface][Data Record Manager]
    No Such Table Or Object

    Thanks again for your help.

    darrellj

  6. #6
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Sounds like you've got some problems with your DDFs. What happens if you use my sample in the DEMODATA database?
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

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