My group is trying to connect our Oracle database to our Website using ASP...since that's what the TA told us to do, that's what we're doing. Anywho, we're having mega problems with simply connecting it, much less using it call functions, etc. Here's what we've got so far, any help would definately be appreciated!
<%@ Page Language="VBScript" %>
<%@ import namespace = "System.Data" %>
<%@ import namespace = "System.Data.Sqlclient" %>
<HTML>
<script runat="server">
Sub Page_Load(Sender as Object, E As EventArgs)
Dim connCW as OleDb.OleDbConnection
Dim daCW as OleDb.OleDbCommand
connCW=New OleDb.OleDbConnection("Provider=OraOLEDB.Oracle.1; User ID=xxxxx; Password=xxxxx; Data Source=omisdb;")
daCW=New OleDb.OleDbCommand("Select person_id, f_name from person",connCW)
connCW.open()
Dim orsDReader as OleDB.OleDBDataReader = daCW.ExecuteReader()
Do while orsDReader.Read()=True
myLabel1.text =orsDReader("person_id")
myLabel2.text =orsDReader("f_name")
Loop
connCW.close()
End Sub
</script>
<body>
<form runat="server" ID="Form1">
<b>person_id</b> <asp:label id="myLabel1" runat="server" />
<p><b>f_name</b> <asp:label id="myLabel2" runat="server" /></p>
</form>
</body>
</HTML>
The above works except it only returns one value instead of all values in the db. We can't figure out why.
Thanks again!
Genevieve
Wowzers! o.O
Visit my cell! 754
[This message has been edited by Genevieve (edited 03-10-2003).]
[This message has been edited by Genevieve (edited 03-10-2003).]