Ask a Question related to Coldfusion Database Access, Design and Development.
-
Snowcrash_10 #1
Create Stored Procedure
I have written two Stored Procedures, one for Oracle and one for SQL Server,
that return NextID's from dynamic table/fields. My problem is that I have now
written CF scripts to send to clients to run on their DB to create the Stored
Procedures (sp) and neither of the scripts run correctly. I know the stord
procedures are correct and really that is not the problem. The problem is that
the script does not run correctly. For example, in Oracle, the query to
generate the sp starts :
<CFQUERY NAME="createSP" DATASOURCE="#dbDataSource#"
USERNAME="#dbUserName#" PASSWORD="#dbPassword#">
CREATE OR REPLACE PROCEDURE #storedProcedureName# (tableName IN varchar,
fieldName IN varchar, extraParam IN varchar, orderField IN varchar, orderParam
IN varchar, maxID OUT varchar, orderID OUT varchar)
IS
myTableName varchar(255);
myColumnName varchar(255);
myOrderField varchar(255);
BEGIN
maxID := 0 ;
orderID := 0 ;
....
End
and this runs without problem. I go to Oracle (9i) and open the stored
procedure and it shows that it has compiled with an error :
"Line # = 1 Column # = 181 Error Text = PLS-00103: Encountered the symbol ""
when expecting one of the following: ; is with authid as cluster order
using external deterministic parallel_enable pipelined "
Now if I copy the whole procedure within the Oracle environment and past it
straight back in and compile it again, I get no errors. I make absolutely no
change to any of the text.
Now when I try to run a similar scripts in SQL Server, I get an error before
the stored procedure is created which reads :
"[Macromedia][SQLServer JDBC Driver][SQLServer]Line 115: Incorrect syntax near
'GO'. Error Executing Database Query."
But then when I go into the SQL Server EM, the stored procedure has been
created and it compiles without error.
Anyone have any ideas about any of this.
Barb
Snowcrash_10 Guest
-
Stored Procedure
EXEC master..xp_cmdshell 'cscript c:\path\file.vbs' EXEC master..xp_cmdshell 'c:\path\file.exe' "Kannan" <gk_i@yahoo.com> wrote in message... -
stored procedure value
How can I bind a stored procedure value to a page? I've executed a stored procedure and there should be two column values created...i.e. col1 and... -
help with a stored procedure
I am new to postgres stored procedures and would like a little help. My function basically takes 2 arguments and inserts data into a table from a... -
need help on a stored procedure
I have 2 tables. table1 and table2 I do a select on table1 and join table 2 on id. I want to check newprice in table1. if it is null, I want to... -
Re-create stored procedure in Oracle 8.0.5
"Richard Foote" <richard.foote@bigpond.com> wrote in message news:<yVuT9.20373$jM5.56361@newsfeeds.bigpond.com>... Hm, it sound like a good... -
Snowcrash_10 #2
Re: Create Stored Procedure
Woops, lied, the stored procedure in SQL Server doe snot get created at all. I
had an old version in my DB. But when the error is thrown, I get an output of
what the Create Stored Procedure statement looks like. If I copy this exactly
into SQL Analyzer and run it, the SP gets created without error.
Barb
Snowcrash_10 Guest
-
Snowcrash_10 #3
Re: Create Stored Procedure
OK, I worked them both out. If you are interested, the SQL Server procedure do
not require the GO at the bottom (no really) and the Oracle Procedure worked
when I removed all the tabs and line returns (one very long single line).
Barb
Snowcrash_10 Guest
-
meatn2veg #4
Re: Create Stored Procedure
Yeah, Go is not even a T-SQL command, let alone has a JDBC equivalent; its a
command that is recognized by the SQL Server tools only e.g. Query Analyzer,
SEM etc. For example you cant do multiple inserts with GO in between them from
a cfquery.
meatn2veg Guest



Reply With Quote

