Wrox Programmer Forums
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2004, 12:09 PM
Authorized User
 
Join Date: Jun 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default error message

I have a datagrid with template columns and when I call the dgeditponto_ItemDataBound (the code is above) i receive the following message:

"DataBinder.Eval: 'System.Char' does not contain a property with the name Movimento"

Does anyone have any ideia of what causes this? I don't understand why.

Thanks to you all

Code:
Private Sub dgeditponto_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgeditponto.ItemDataBound

Dim ds As New DataSet

If e.Item.ItemType = ListItemType.EditItem Then

Dim strSql As String = "Select tipo_movimento.Cod_Tipo_movimento as [Movimento], tipo_movimento.Tipo_movimento as [Entradas/Saídas] from Tipo_movimento Order By tipo_movimento.Tipo_Movimento"


Dim myCommand As New SqlClient.SqlDataAdapter(strSql, sqlConFuncionarios)
 myCommand.Fill(ds)

 Try

    With DirectCast(e.Item.FindControl("dbES"), DropDownList) 'keyword introduces a type conversion operation
            .DataTextField = "Movimento"
             .DataValueField = "Entradas/Saídas"
             .DataSource = ds
             .DataBind()
              .SelectedIndex = .Items.IndexOf(.Items.FindByText(Me.m_ESseleccionada))
    End With
                'Catch ex As SqlException
                '    Response.Write("Ocorreu um erro na Base de Dados.")
                'Catch ex As Exception
                'Response.Write("Ocorreu um erro inesperado.")
            Finally

                If SqlConFuncionarios.State = ConnectionState.Open Then
                    SqlConFuncionarios.Close()
                End If

            End Try

        End If
    End Sub


Elisa Resina
__________________
Elisa Resina





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the error message for a 500 server error? chobo2 C# 2005 1 May 4th, 2008 03:11 AM
Where does the error message go? Wei Wang BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 13th, 2006 02:03 PM
Error Message alannoble26 Excel VBA 4 November 25th, 2005 11:20 AM
error message. Tasha Access VBA 2 August 11th, 2004 11:07 PM
Help with Error message mariakovacs Classic ASP Databases 3 October 10th, 2003 03:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.