Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Location
    Karachi
    Posts
    9

    Unanswered: Truncate or Drop through Forms ?

    Hi,
    I am using Forms 6i on ORACLE 8i and due to some user requirements, I have to truncate few tables through FORMS 6i. After that I have to import new records in these tables from dmp file.

    Can any buddy help me
    Thanks in advance...

  2. #2
    Join Date
    Apr 2004
    Posts
    246
    make a stored procedure which performs dynamic sql (execute immediate or dbms_sql package) to do the truncate. call the procedure from forms.

    Forms 6i does not work with dynamic sql, thats why it must be a stored procedure, not a local forms procedure.
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

  3. #3
    Join Date
    Oct 2004
    Location
    Karachi
    Posts
    9
    I have tried creating stored procedure but theres compilation error. Does it accepts TRUNCATE command ?
    If possible plz, give me syntex for Truncating any table through Stored Procedure.

    THANKS in advance

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by maliksarmad
    I have tried creating stored procedure but theres compilation error. Does it accepts TRUNCATE command ?
    If possible plz, give me syntex for Truncating any table through Stored Procedure.

    THANKS in advance
    You must use DYNAMIC sql, please post the code that doesn't compile.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Apr 2004
    Posts
    246
    sanity check here - I already said DYNAMIC, didn't I? I even specified either execute immediate or dbms_sql. What more do people want from me!!!!
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

Posting Permissions

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