Re: How to run SQL Script through VFP?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Anand (aramanan_at_ivesia.com)
Date: 09/17/04


Date: Fri, 17 Sep 2004 10:12:37 +0530

Hi George / Rick,

I am already using SQL Pass Through in my project.

My question is that I have a stored procedure created on my schema in
Oracle.

I want to implement the scenario at my client's place.

For this, I generated a .SQL file. I will be able to load this script into
Oracle and create the stored procedure through SQL Plus by issuing @
c:\temp\sample.sql, but if I do the same from VFP through SQLEXEC(gn_handle,
"@ c:\temp\sample.sql") it doesn't work.

I tried putting the script in a Memo field say sample.temp and ran
SQLEXEC(gn_handle, sample.temp).

The script executed and the procedure was created in Oracle. But Oracle
says that the procedure is invalid and throws the following error while
compiling it:

"Encountered the symbol "" when expecting one of the following: ; is with
authid deterministic parallel_enable as"

But when I just disturb the stored procedure by replacing one of the
characters with the same character again for example, deleting a 'e' and
typing 'e' again in the same position, it says the procedure is valid!!!!
This disturbance can be performed anywhere in the code of the stored
procedure.

What could be the problem? Is this a problem with the code page???

Regards,

Anand.

"George" <SpamMyAss@Mailinator.com> wrote in message
news:%23WF0P8%23mEHA.3968@TK2MSFTNGP11.phx.gbl...
> SQLEXEC is the way to go
> Take a look at all SQL* commands in Fox
>
> Rick Bean wrote:
>
> > Please clarify: Do you want to run a stored procedure on an Oracle
database, or do you want to create a stored procedure in the database?
> >
> > Rick
> >
> > "Anand" <aramanan@ivesia.com> wrote in message
news:uiUFgt9mEHA.1296@TK2MSFTNGP09.phx.gbl...
> >
> >>Hi,
> >>
> >>Does anyone know how to run SQL script through VFP and load it into
Oracle?
> >>
> >>Regards,
> >>
> >>Anand.
> >>
> >
> >>



Relevant Pages

  • Re: composite key question
    ... Each time you do an insert SQL ... it's probably not a stored procedure. ... queries to perform slower, however. ... Seeing as how that script you sent was not a stored proc, ...
    (microsoft.public.sqlserver.programming)
  • Re: Performance problems with StoredProcedure in Web application
    ... you could probably just ignore my comments about stored procedure performance as compared to textual queries because they ... As for your question about how to avoid using a cursor (as I suggested was possible in Oracle) read the following paragraph for more ... The .NET Framework Data Provider for Oracle does not support batched SQL statements. ... CURSOR output parameters to fill a DataSet, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: I cant schedule more than one jobs with Oracle Scheduler
    ... scheduled jobs instead of raw sql commands if the commands tend to be ... Oracle doesn't force you to do it in some particular ... The problem is that SQL VARCHAR2 type ... wrapping it into a stored procedure will remove ...
    (comp.databases.oracle.server)
  • Re: EXEC syntax for SP which returns row set
    ... >>> Oracle experts, none of whom seem to know. ... >> SQL> create or replace package returncur is ... > I don't know why you are supplying the above example. ... to illustrate HOW you'd call a stored procedure and return ...
    (comp.databases.oracle.server)
  • Re: Newbie - Stored Procedures/ASP Question
    ... I tried shortening the Stored Procedure, and using the script from your ... The SQL Stored Procedure is below. ...
    (microsoft.public.inetserver.asp.db)