Obj Reference Error

R

rbutch

can any one tell me where the "Object Reference Not Set to an Instance of An Object" error is coming from in the code below? the procedure before logs on w/ no problem. i cant figure out which ref to which obj is getting lost.
thanks for any help.
ps. i ripped this code right out of another working program that basically does exactly the same thing. i had this in n-tiers but pulled it back to the code-behind cause i thought maybe some reference got lost.
any help is definately appreciated



Private Sub btnGetII_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetII.Click
Dim myLogon, myPwd, sql, db As String
myLogon = Session("Logon")
myPwd = Session("Pwd")
db = Session("db")
Try
Dim ds As DataSet
sql = "select * from CMI_CLOCK_MESSAGES"
Dim oracon As New OracleConnection("Server='" & db & "';Uid='" & myLogon & "';Pwd='" & myPwd & "'")
oracon.Open()
Dim myCmd As New OracleCommand
myCmd.Connection = oracon
myCmd.CommandText = sql
myCmd.CommandType = CommandType.Text
Dim da As New OracleDataAdapter(myCmd)
da.Fill(ds)
If ds.Tables(0).Rows.Count <= 0 Then
Response.Write("Nothing found")
Else
DG1.DataSource = ds.Tables(0).Rows
DG1.DataBind()
End If
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
R

rbutch

thanks, i actually tried that too. im wondering if there's something else going on.
im using the schema name, but in the TNS names files it's listed as dbName.world. is it possible that its letting me log on, but not access any data??

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top