>>Hi all,
>>
>>I am trying to reteive and text from a Text data type field using Ado.net (and vb.Net). But all I seem to be getting is an integer value. Is there a special trick to retreiving it? And once I get it, and edit it, how would send it back to the server to save?
>
>Can you post some code?
>
>Also, may be it's better to switch to varchar(max) instead of Text?
As for changing the data type, the database is a pre-existing database and another application owns it. I am developing a Query By Example application where only the Comment (Text) field can be modified.
Here a snipit of code I am using to retreive the data.
lcCmd = "select * from " & lcTable & " where Number='" & lcNumber & "'"
Dim cm As SqlCommand = New SqlCommand()
cm.CommandText = lcCmd
cm.Connection = cn
dr = cm.ExecuteReader
dr.Read()
lcData = dr.Item("Comment").ToString()
Greg Reichert