Dynamic SQL

I need to get this proc to work so I can finish the reports for our project. Looks OK to me, but I keep getting the error: "ORA-00604: error occurred at recursive SQL level 1\nORA-01003: no statement parsed\n". Any ideas on making this work are appreciated.
CREATE OR REPLACE PROCEDURE REPORT_GETREPORTDATA

(
P_CURSOR OUT TYPES.CURSOR,
REPORTIDIN REPORTS.REPORTID%TYPE,
SQLWHERE REPORTS.SQLSTATEMENT%TYPE
)
AS
SQLSELECT VARCHAR2 (4000);
BEGIN
SELECT SQLSTATEMENT
INTO SQLSELECT
FROM REPORTS
WHERE REPORTID = REPORTIDIN;

SQLSELECT := SQLSELECT || SQLWHERE;
OPEN P_CURSOR FOR SQLSELECT;

EXCEPTION
WHEN NO_DATA_FOUND THEN
Null;
WHEN OTHERS THEN
Null;
END REPORT_GETREPORTDATA;
0
proximo
8/12/2003 12:53:13 PM
asp.net.oracle 2269 articles. 0 followers. Follow

0 Replies
934 Views

Similar Articles

[PageSpeed] 37

Reply:

Similar Artilces:

Connecting PB 5.0.03 to Oracle 8 (NT) through SQL Net v2 with driver for Oracle 7.3 of PB
Can anyone assist me on Connecting PB 5.0.03 to Oracle 8 (NT) through SQL Net v2 with driver for Oracle 7.3 of PB ? Thank you very much in advance. -- John Fotiadis Direct +30 94-464225 Senior Systems Engineer Relational Technology S.A. In article <34979B76.67A813A8@sybase.com.gr>, johnf@sybase.com.gr says... > Can anyone assist me on Connecting PB 5.0.03 to Oracle 8 (NT) through > SQL Net v2 with driver for Oracle 7.3 of PB ? > > Thank you very much in advance. > > -- > John Fotiadis > Direct +30 94-464225 > Senior Systems Engineer > > Relational Technology S.A. > > > I've replyed to your email before I saw your post here. You should be able to connect to Oracle 8 using the PowerBuilder Oracle 7.3 driver. Let me know if you need further assistance. -- Regards, Don Roof [TeamPS] Spectrum Technology Group, Inc. droof@netmcr.com ...

PB 6.5 DB Backend Change from Oracle 7.3 to Oracle 8 Dynamic SQL Format 4 Problems
I have an application that historically has accessed an Oracle 7.3 database backend. The DB backend has been upgraded to Oracle 8 and now the application has problems with code which follows the Dynamic SQL Format 4 model. The following code snippit worked fine when connected to Oracle 7.3...but, now causes a Fatal Application Error: ********************************** ls_SQL = x_sql_tree[i_next_level].s_sql prepare sqlsa from :ls_SQL; describe sqlsa into sqlda; declare tree_cursor dynamic cursor for sqlsa; setdynamicparm(sqlda, 1, dbl_curr_rec_no) *****************************...

.net + dynamic SQL-query
On our page we have texbox, dropdownlist, database and gridview for it.It DropDownList we have all names of columns from database (in our situation they are Item_Name, Item_Type,  City and Country). In database we have two more columns, but we do not need them in this task.And the task is to choose from DropDownList item/value and deliver it to SQL-query. We have done searching from database, but the column to search from is static, we want to make it dynamic, we want to choose from Dropdownlist column, from which we will search.We are making all in aspx, not in .cs code. We are not fam...

Dynamic SQL/Oracle Error
I get the following error, "ORA-01008 not all variables bound" when executing the following line of code for dynamic sql format 4: DESCRIBE sqlsa INTO sqlda; We recently migrated to PowerBuilder 7.0 Build 6012 and Personal Oracle 8 using the O84 native driver. This previously worked with PowerBuilder 5 and Oracle 7.3 and SQLBase. I have tried changing the DiableBind DBParm with no luck. Any help would be appreciated. Thanks, Larry Try continuing to use the O73 driver. On Tue, 15 Feb 2000 11:01:47 -0600, in powersoft.public.powerbuilder.powerscript Larry Hop...

urgent: .NET Provider for Oracle or Oracle Data Provider for .NET
If I want to access Oracle DB in ASP.NET application, and I am using .NET Provider for Oracle or Oracle Data Provider for .NET, should I have to install OracleClient on my .NET server? Is there other choice? Thank you very much.Johnson Johnson2007:should I have to install OracleClient on my .NET server?  You have to options1. install the ODP.NET on your web serverOR2. put the oracle assemblies in your BIN directory   Hi jimmy,Thank you for you reply. Because I could not find a server right now, I should test it first before I agree or disagree with you, as most articles I...

ODBC/ORACLE/SQL-NET
To connect to Oracle 7.2 using ODBC do I need to still install SQL NET. Or SQL net is only needed with native PB driver. TIA On Thu, 11 Dec 1997 22:49:47 +0000, Rajesh Puri <purirb@erols.com> wrote: >To connect to Oracle 7.2 using ODBC do I need to still install SQL NET. >Or SQL net is only needed with native PB driver. TIA SQL*NET is needed with both the native and the ODBC driver. Bruce Armstrong [TeamPS] | Source Consulting mailto:brucearm@ix.netcom.com | mailto:jobs@sourcela.com http://www.netcom.com/~brucearm/ | http://www.sourcela.com ...

.net C# Oracle sql string
I am trying to build sql string in c# for oracle db to select records by date. Here is the code:            mySelectQuery += String.Format("SELECT * from Training.trschedules_view where STARTDATE >= {0}",sdate.ToString("MM:dd:yyyy"));sdate is C# DateTime field.STARTDATE is Oracle DATE columnIt returns 0 rows with error: inconsistent data types: ORA-00933: SQL command not properly endedThere are lot of rows. I don't know what the syntax error is - can some one help?vihrao1 I also tried it another way to b...

Dynamic SQL and Oracle Stored Procedures
Is it possible to use Dynamic SQL to execute a stored procedure with Oracle (7.2.x and up)??? I've declared them as external functions with the RPCFUNC method, but I have a case where I cannot bind them into the code and need to construct them on the fly. With MSSQL it's pretty straight forward: string lsSQL lsSQL= "exec sp_my_proc '" + asMyStringVariable + "'" EXECUTE IMMEDIATE lsSQL USING SQLCA; But I don't know how to do something like this with Oracle. Thanks, Tim Perkins (Yes, the same Tim Perkins that used to lurk ...

Is Oracle SQL*Net not thread-safe?
I've included a program that demonstrates a problem accessing an Oracle database using Power++ Query and Transaction Objects with ODBC drivers in a multi-threaded application under heavy load. Power++ 2.1 Oracle Database 7.2 or 7.3 SQL*Net 2.3.3.0 (Also tried Version 8's SQL*Net) ODBC layer 3.510.3002.13 Microsoft ODBC for Oracle 2.573.292700 Also tried Oracle's ODBC driver from Version 8 Client CD. NT Workstation 4.0 SP4 and NT Server 4.0 SP4. If run on a multi-processor machine this program will crash very quickly after several threads are start...

Dynamic SQL Calling Oracle SP
Hello all! I'm trying to write a generic PB nvo for calling Oracle SP's that do a "getID from value" type of lookup. The procedure definition is: PROCEDURE sp__getIdentifier ( v_codeValue IN NUMBER, v_identifier OUT NUMBER ) If I use the following syntax everything works fine: Long ll_identifier DECLARE get_id PROCEDURE FOR irrs_dev.pa__building_lookup.sp__getNSI( :codeValue ) USING SQLCA; EXECUTE get_id; IF SQLCA.SQLCode = 0 THEN FETCH get_id INTO :ll_identifier ; CLOSE get_id; END IF However...

ORACLE :: Dynamic SQL :: SqlDataSource :: SelectCommand
Hi All, I have to modify a query which I currently have in place for a given table.  Unfortunately, I will soon have to modify this query to perform the same function on one of two tables (chosen by the user).  All of the column names and data types are the same for the tables.  Eventually there will be more tables with the same column names that will have to be selected among.  I do not have control over this.  Is there a way *i'm assuming with dynamic SQL* to run the same query on a table specified as a SelectParameter using a SqlDataSource Control? ...

OLEDB ORACLE : Dynamic SQL generation..
oleDbAdapter.Update(dataSet,"MyTable");giving error :Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.can any body help me I Searched here and there no any solution i found. Then i try same code in different system. Same Code is working.The problem was the provider OLEDB.  hemant_sdin wrote:oleDbAdapter.Update(dataSet,"MyTable");giving error :Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.can any body help me Where is the rest of the code? It is impossibl...

Dynamic SQL and Oracle Stored Procedures
Is it possible to use Dynamic SQL to execute a stored procedure with Oracle (7.2.x and up)??? I've declared them as external functions with the RPCFUNC method, but I have a case where I cannot bind them into the code and need to construct them on the fly. With MSSQL it's pretty straight forward: string lsSQL lsSQL= "exec sp_my_proc '" + asMyStringVariable + "'" EXECUTE IMMEDIATE lsSQL USING SQLCA; But I don't know how to do something like this with Oracle. Thanks, Tim Perkins (Yes, the same Tim Perkins that used to lur...

Problem with PowerBuilder, Dynamic SQL, Oracle and CLOB
(PB 8.0.3 build 9704 & Oracle9i) I'm trying to create a "generic" response window to manipulate CLOBs from various tables (one at a time). I pass in three variables to the window: 1. field_name 2. table_name 3. where_clause So far I'm not even able to retrieve the CLOB value using Dynamic SQL. I try the following: I set up a string in the PB Code: ls_get_string = " SELECTBLOB " + is_field_name + " FROM " + is_table_name + is_where_clause This statement returns one row (I took the ls_get_string value and executed the statement in...

SQL Injection and Dynamic SQL
The consensus on avoiding SQL injection attacks is to pass all your collected data to a stored procedure. If you have to return a result set from a complex form, the answer seems to be to use dynamic SQL. On further study, I discovered that dynamic SQL has a lot of potential pitfalls and low and behold can still be vulnerable to injection attacks. I know that I am not the first person to ever try and collect data from a web form and return a result set, so what are the best practices? Say I have a complex form with about 25 search criteria (most of which are optional), I go through all t...

Dynamic SQL in Transact SQL
Does Dynamic SQL can be done in transact sql format in stored procedure? If yes, any reference can be read? Thx..... ...

Dynamic SQL in Sybase SQL
Im trying to create a bit of Dynamic SQL in a Sybase stored procedure, im used to MS SQL Server so im not sure what im doing wrong in Sybase. Heres my bit of code declare @sql varchar(100) declare @sql2 varchar(100) Select @sql = '''0001/100212'',''0001/100218'',''0001/100240'','0001/100243''' select @sql2 = 'select * from table where table_tra_code in (' + @sql + ')' Exec @sql2 now i would have thought this would have executed @sql2 and returned a result set, but no :(. Any ideas?, id...

Oracle Dynamic sql (DBMS_SQL) and PB 6
I have a stored procedure which builds various dynamic sql statements. When running from SQL Plus, all is fine. When I try and create a datawindow using the same procedure I receive an error message stating "Cannot Create Datawindow. 1 execute STAGE_OWNER.P2:0 CODE = :CODE". The variable :CODE is the name of the dynamically binded variable. It has been narrowed down to two things... 1) It won't allow a WHERE clause with binded variables, and 2) It won't allow dynamically built stored procedure names to be called. Again, both of these cases work fine in SQL Plus, n...

PB
I am calling an Oracle function from PB 6.5. Example 1: This code properly returns the code from the function. select HETC001$PKG.f_validate_number(199) into :li_Rc from dual USING SQLCA; Example 2: This code does not return the return code from the function although the sql db return code = 0. ls_string1 = 'HETC001$PKG.f_validate_number(199)' ls_string2 = ':li_rc' ls_string3 = 'dual' myplsql = 'select ' + ls_string1 + ' into ' + & ls_string2 + ' from ' + ls_string3 EXECUTE IMMEDIATE :myplsql USIN...

PB
I am calling an Oracle function from PB 6.5. Example 1: This code properly returns the code from the function. select HETC001$PKG.f_validate_number(199) into :li_Rc from dual USING SQLCA; Example 2: This code does not return the return code from the function although the sql db return code = 0. ls_string1 = 'HETC001$PKG.f_validate_number(199)' ls_string2 = ':li_rc' ls_string3 = 'dual' myplsql = 'select ' + ls_string1 + ' into ' + & ls_string2 + ' from ' + ls_string3 EXECUTE IMMEDIATE :myplsql USING sqlc...

Return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle
Hello, I am wondering if anyone in this community knows the shorter way to return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle, something likereturn (IDataReader) SqlHelper.ExecuteReader(ConnectionString, "GET_ACCOUNT", Id); instead of using the way below (look at the C# code) Stored Procedure create or replace PROCEDURE "GET_ACCOUNT" ( p_ID IN ACCOUNT.ID%type, retCursor OUT SA.MYGEN.sqlcur ) IS BEGIN OPEN retCursor FOR SELECT ID, NAME FROM ACCOUNT WHERE ID = p_ID ; ...

PL/SQL or Oracle SQL
I am mostly a SQL server user, but by chance used to use Oracle 7.3.4, 8.1.5 and now 9.2. In the current project, the client wanted us to write Oracle SQL instead of Stored Procedure (PL/SQL), and argued that since Oracle 8, the dynamic Oracle SQL string in the client code is as faster as a stored procedure. Actually, this kind of debate happened in the SQL server field. But, it seems in the SQL server field, most people prefer to use SP, not just due to the performance, but the considerations including code encapsulation, code re-use, less traffic, security, better management and so on. ...

Dynamic SQL Format 4 statement with ORACLE
I am using PB7 with the O84 driver to connect to an Oracle 8.0.4 database. And I try to use Dynamic SQL in Format 4, and write the code below: DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA ; Sqlstatement = "SELECT id FROM customer & WHERE customer_name = ?" PREPARE SQLSA FROM :Sqlstatement; IF SQLCA.SQLCODE < 0 THEN MessageBox('', SQLCA.sqlerrtext) return END IF DESCRIBE SQLSA INTO SQLDA; IF SQLCA.SQLCODE < 0 THEN MessageBox('', SQLCA.sqlerrtext) return END IF . ...

Sql Dynamic Format 4 with Oracle SP is not working
Hello, The following code does not work. I don=b4t know why... sqlca =3d CREATE transaction sqlca.logid =3d "dbo" sqlca.logpass =3d ... //sqlca.dbms =3d "O84 Oracle8/8i (8.x.4+)" sqlca.dbms =3d "O90 Oracle9i (9.0.1)" sqlca.servername =3d "banksys.ntdominio1" sqlca.AutoCommit=3dfalse CONNECT USING sqlca; string ls_sqlstatement ls_sqlstatement =3d 'EXECUTE DBO.SMP_GENERAL( ? , ?)' DECLARE sp_ora dynamic PROCEDURE FOR SQLSA; PREPARE SQLSA FROM :ls_sqlstatement; DESCRIBE SQLSA INTO SQLDA; MessageBox("Info Describe&...

.NET code to get result from Oracle PL/SQL
I need to get data from Oracle PL/SQL into the DataSet. I have a PL/SQL runnable on Oracle database. I can run the PL/SQL and get result from SQL Plus by the command: var c refcursor BEGIN GETADR_UNDERLYING('A%','MCRSFT001','I', :c); END; / print c I don't know how to run the PL/SQL from the C# code and get result back. I believe that I need to use a cursor as an output (as :c in my PL/SQL). How can I make it work? Could you give me a peice of sample code? Thanks a lot.MCAD.NET (C#)MCP on: SQL Server 2k Design&Iimplementation, Web Development (VI 6.0) and VB 5.0 ...

Web resources about - Dynamic SQL - asp.net.oracle

Dynamics - Wikipedia, the free encyclopedia
Brownian dynamics , the occurrence of Langevin dynamics in the motion of particles in solution (e.g. a grain in water, as was first seen by Brown); ...

Datacenter Dynamics
Datacenterdynamics for data center information, conferences, news, videos, whitepapers and reports globally

Dynamic Chiropractic - chiropractic, news, articles, research & information for chiropractors - Find ...
Dynamic Chiropractic - chiropractic, news, articles, research & information for chiropractors - Find a Chiropractor

Malcolm Turnbull announces 'dynamic' ministry
Prime Minister Malcolm Turnbull announces the results of a ministerial reshuffle, to feature six women in cabinet, in the wake of several retirements ...

Cabinet reshuffle: Malcolm Turnbull unveils 'dynamic' new ministry as Mal Brough resigns
Prime Minister Malcolm Turnbull announces his new frontbench, emphasising the roles of his younger and female colleagues.

Master & Dynamic unveils a palladium-coated version of its ME05 earphones
Master & Dynamic might not be a household name, but the New York City based company is continuing to produce some great, high-end audio products. ...

Lenovo and Apple: PCs’ Dynamic Duo, Gobbling Up Share in Downbeat Market
... in units sold, with gains in market share for top vendor Lenovo Group ( 0992HK ), and for Apple ( AAPL ), who turned out to be the Dynamic Duo ...

Seattle Councilmember O'Brien: Power dynamic between Uber, drivers is out of balance
Seattle is the first city in the U.S. to give Uber drivers the right to form a union, but whether that actually happens might be up to the courts. ...

General Dynamics Co. (GD) Position Maintained by Chicago Trust Company
Chicago Trust Company held its stake in shares of General Dynamics Co. (NYSE:GD) during the fourth quarter, according to its most recent 13F ...

Dynamic difficulty tuning is coming to Killing Floor 2
Killing Floor has a fairly hardcore following: these folks build wikis to know every single damage value in the game, and pore over enemy animations ...

Resources last updated: 2/22/2016 10:17:35 AM