Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Tilde in SQL & ASP.NET DataReader

Avatar of Member_2_1242703
Member_2_1242703 asked on
.NET ProgrammingASP.NETMicrosoft SQL Server 2005
4 Comments1 Solution715 ViewsLast Modified:
I have a datareader bringing in information and assigning it to a label using the code below. Whenever it runs into a tilde (~) in one of the datasets, it chops it off and everything prior to it. How can I get around this?
Private Sub ReadNext()
        Me.ResetDataReader()
        If CType(Session.Item("reader"), Data.SqlClient.SqlDataReader).Read() Then
            If Not CType(Session.Item("reader"), Data.SqlClient.SqlDataReader)("DESCRIPTION") Is DBNull.Value Then
                Label4.Text = CType(Session.Item("reader"), Data.SqlClient.SqlDataReader)("DESCRIPTION").ToString
            Else
                Label4.Text = ""
            End If
           
            
    Private Sub ResetDataReader()
        Dim myConn As New Data.SqlClient.SqlConnection(myConnString)
        Dim mySelectQuery As String = "SELECT * FROM tblMain"
        myCommand = New Data.SqlClient.SqlCommand(mySelectQuery, myConn)
        myConn.Open()
        myReader = myCommand.ExecuteReader
        Session.Item("reader") = myReader
    End Sub
ASKER CERTIFIED SOLUTION
Avatar of Todd Gerbert
Todd GerbertFlag of United States of America imageSenior Engineer
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers