 |
| ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 15th, 2006, 12:24 AM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
PL/SQL
Hi,
All
Can you tell me if ASP.NET supports or not the PL/SQL language?
Thanks
Somesh
someshchaterjee
__________________
somesh chaterjee
|
|

December 15th, 2006, 01:46 AM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
Somesh:
No. PL/SQL is Oracle's proprietary software.
|
|

December 15th, 2006, 09:51 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Hold on. .NET does include Classes to connect to ORACLE backends and, as such, any valid PL/SQL command that you can pass to oracle you can pass through the Oracle classes and have the database execute the command.
Doing so is no different then when you use the SQL objects to pass T-SQL commands to a SQL Server.
So yes, you should beable to connect your .NET app to an oracle database and execute commands against it.
hth.
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|

December 15th, 2006, 02:32 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
Maybe here there is a difference in interpreting the question or I have not reached the section on ASP.NET Web Services yet. However, I interpreted the question to mean as follows:
After one has set the appropriate connections via Oracle's supplied classes(<%@ import .... System.Data.OraclClient>) and after the string connection:
Dim strConnection As String=ConfigurationSettings.Appsettings("OracleDB ")
Dim objConnection As New OraclConnection(strConnection)
then on the next statement:
Dim strPLSQL As String = "SET SERVEROUTPUT ON
DECLARE
v_row_count PLS_INTEGER := 0;
v_field_count PLS_INTEGER := 0;
v_null_count PLS_INTEGER := 0;
v_nullbit BOOLEAN := NULL;
v_test_column tblname.tblcolumn%TYPE;
-- Cursor Declaration
CURSOR tbl_cur IS
SELECT count(a.tblid),
a.tblcolumn
FROM tblname a;
-- Execution section
BEGIN
DBMS_OUTPUT.ENABLE(5);
-- Open cursor
OPEN tbl_cur;
-- Loop thru all records
LOOP
FETCH tbl_cur INTO v_row_count, v_test_column;
EXIT WHEN tbl_cur%NOTFOUND;
-- test for Nulls
IF v_test_column = v_nullbit
THEN v_null_count := v_null_count + 1;
ELSE v_field_count := v_field_count + 1;
END IF;
END LOOP;
-- Display All Counts
DBMS_OUTPUT.PUT_LINE('Total Records: 'v_row_count
||','
|| 'Total Empty Cells: ' v_null_count
|| ','
|| 'Total Cells Used: ' v_field_count)
CLOSE tbl_cur;
END;"
Whether one can put all the PL/SQL code into "applet" or "script", I don't know ... have not reached that section yet. Maybe the above code could be transposed into "Javascript", but then that would be javascript and not PL/SQL. Executing the Standard SQL commands would because at this point oracle db is of the Xbase technology (relational DB). I even left out the EXCEPTION Block.
"....when in doubt, punt". So Somesh what type of PL/SQL support were you referencing in your question?
|
|

December 15th, 2006, 04:00 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
In so far as your above code goes, I understand your interpetation. In reality though, I programmer would never do this (while it is possible). It does not lend itself well to readability in the slightest bit and would be better as a stored procedure somewhere on the server.
Basic SQL Commands (SELECT, UPDATE, DELETE, INSERT) it is plausable to have those inline but, in the above instance, it is just silly to presume someone would place this inside their code.
Again, that is my opinin.
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|

December 15th, 2006, 04:46 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
I was simply demonstrating "PL/SQL" code only, to understand what Somesh is asking in his question. I did not say that the inserted code (strPLSQL) was the best way or best practice or any of the sort. Just trying to get a clearer understanding of the "original question" in this topic.
================================================== ==============
Note the following quotes:
"So what is PL/SQL? It is procedural (and sometimes object-oriented) programming extension to SQL, provided by Oracle, exclusively for Oracle."
"... The PL in PL/SQL stands for procedural language. PL/SQL is a proprietary language not available outside the Oracle Database." From the book, [u]Oracle Database 10g- PL/SQL Programming</u>, Scott Urman, Ron Hardman and Michael McLaughlin, Oracle Press, p.6
|
|

December 15th, 2006, 04:58 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Lets just agree to disagree. I make the understanding that when someone asks that question that they are asking for interface support for a type of RDBMS not if X technology or language supports, natively, the ability to write SQL Statements in code and have the compiler interpet them as valid PL/SQL statements.
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|
|

December 15th, 2006, 05:49 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
I would prefer the word "impasse"....SQL is the second part of PL/SQL, so data manipulation language(DML), i.e. SELECT(Data Retrieval only),INSERT, UPDATE and DELETE statements are valid and usuable.
Well Somesh...there you go... I am finish with this topic, regardless.
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| PL/SQL Cursor help |
Wikked |
Oracle |
1 |
March 12th, 2005 01:19 AM |
| PL/SQL |
cooldude87801 |
Oracle |
1 |
March 3rd, 2005 10:54 AM |
| PL/SQL i need help |
loveboy23 |
Oracle |
3 |
January 6th, 2005 01:14 AM |
| PL/SQL help |
carly_1 |
Oracle |
1 |
October 19th, 2003 08:14 PM |
| PL/SQL help |
Blue |
Oracle |
0 |
August 12th, 2003 02:54 PM |
|
 |