Retrieving SQL Server Text data type in VB.NET 
Author Message
 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



Wed, 23 Feb 2005 23:04:55 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Sample Text file - Retrieve data elements and write to SQL Server DB

2. Problem reading Text data type from SQL Server

3. Problem reading Text data type from SQL Server

4. Accesssing SQL Server Text data types using RDO

5. FILE UPLOAD FROM ASP TO SQL SERVER TEXT DATA TYPE

6. ADO Data type for SQL Server Text

7. SQL Server Text Data Type

8. SQL Server 'Text' Data Type Field

9. VB.Net and SQl Server - adding values by type

10. SQL Server Data Types in VB

11. SQL server varchar data type is not readable in VB

12. How do I use a user defined data type VB to SQL Server

 

 
Powered by phpBB® Forum Software