|
-
Dec 19th, 2003, 12:57 PM
#1
Thread Starter
Hyperactive Member
asp.net can't bind the datareader to a listbox..
I am using data access application block. the program runs fine untill it reached 'Listbox1.datasource = drcategories".
the error message is " "Object reference not set to an instance of an object." any idea why it does that?
Dim drCategories As SqlDataReader
drCategories = SqlHelper.ExecuteReader(sqlConn, CommandType.Text, "Select categoryid From Categories")
Try
ListBox1.DataSource = drCategories
Listbox1.databind()
Catch exp As Exception
Response.Write(exp.message)
End Try
-
Dec 19th, 2003, 01:23 PM
#2
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|