Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 15th, 2006, 12:24 AM
Authorized User
 
Join Date: Nov 2006
Location: Bangalore, Karnataka, India.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Somesh
Default PL/SQL

Hi,
 All
Can you tell me if ASP.NET supports or not the PL/SQL language?
Thanks
Somesh


someshchaterjee
__________________
somesh chaterjee
  #2 (permalink)  
Old December 15th, 2006, 01:46 AM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

Somesh:
No. PL/SQL is Oracle's proprietary software.
  #3 (permalink)  
Old December 15th, 2006, 09:51 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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
  #4 (permalink)  
Old December 15th, 2006, 02:32 PM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

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?
  #5 (permalink)  
Old December 15th, 2006, 04:00 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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
  #6 (permalink)  
Old December 15th, 2006, 04:46 PM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

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
  #7 (permalink)  
Old December 15th, 2006, 04:58 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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
  #8 (permalink)  
Old December 15th, 2006, 05:49 PM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.