Intranet ASP Page query

  • 13 years ago

    Hi

    we are looking at putting a SQL Query to our Oracle database on our intranet - would a connection as described below require ORacle to be installed on the machine used to create the query? 

    My query at the moment looks something like :-

     

        Sub Page_Load()
             ' Accept a parameter called "Surname" from the page.
             Dim Surname As String = Request.QueryString("Surname")

             ' Connect to the schema of the ADatabase database.
             Dim objConn As OracleConnection = New OracleConnection("User Id=AUser;Password=APassword;Data Source=ADatabase;")
             objConn.Open()

             Response.Write("Connected sucessfully.<br /><br />")

             Dim strSQL As String = "SELECT Ref_No, App_Title, App_Forename, App_Surname,  from ADatabase where app_surname like '%:Surname%' and receiveddate > trunc(sysdate) - '93'"
             Dim objCmd As OracleCommand = New OracleCommand(strSQL, objConn)

             Response.Write("<br />Disconnected sucessfully.<br /><br />")
        End Sub

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Walking on water and developing software from a specification are easy if both are frozen.” - Edward V Berard