
Retrieving SQL Server Text data type in VB.NET
Hi!
I'm having an issue with the text data type from SQL Server. I have a
VB6 dll which makes a query to a SqlServer table, and I store the
value of the Query into a ADODB.Recordset. But when I try to retieve
this value to put it in a string, the value is always set to Nothing,
even if the field in the record retrieved is full of text. Here is a
snippet:
Dim aRS As ADODB.Recordset
Dim aEntity As New Entity()
Dim anID As String =
"{1315BA6C-87E5-4D5C-B812-668968F6BE47}"
aRS = aEntity.Quickviewdetails(anID)
While Not ars.EOF
Dim aValue As String
If Not IsDBNull(aRS("Scenarios").Value) Then
'--Event if the Scenario field contains "hello",
aValue is nothing
aValue = CType(aRS("Scenarios").Value, String)
End If
ars.MoveNext()
End While
Does someones knows how to reteive this value?
Thanks in advance,
Louis