|
-
Feb 15th, 2005, 07:27 AM
#1
Thread Starter
New Member
How to display a value field from a record
Hello,
I am a newbie and need help in displaying a value from the record in mobile asp.net form. I tried using this line ImagePath = objDataSet.Tables.Rows(0).Item("Image") but there seem to be an error that reads " 'Rows' is not a member of ' System.Data.DataTableCollection ' ". Here is the full code :
Dim strSQL As String = "SELECT Image " & _
"FROM Map " & _
"WHERE Image_ID LIKE '" & Session("SSroad") & "'" & _
"ORDER BY Image_ID"
'Create data objects
Dim objConn As New SqlConnection(strConn)
Dim objCmd = New SqlCommand(strSQL, objConn)
Dim objDataSet As DataSet = New DataSet
Dim objDataAdapter As New SqlDataAdapter(objCmd)
objDataAdapter.Fill(objDataSet)
ImagePath = objDataSet.Tables.Rows(0).Item("Image")
Appreciate the help.
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
|