Foros del Web » Programación para mayores de 30 ;) » .NET »

ayud ano entiendo este error

Estas en el tema de ayud ano entiendo este error en el foro de .NET en Foros del Web. hola miren me da este error BC30451: Name 'fechai' is not declared no entiendo como lo declaro , me ayudan porfa voy a poner el ...
  #1 (permalink)  
Antiguo 08/11/2004, 09:17
 
Fecha de Ingreso: septiembre-2004
Mensajes: 141
Antigüedad: 19 años, 7 meses
Puntos: 0
ayud ano entiendo este error

hola miren me da este error

BC30451: Name 'fechai' is not declared

no entiendo como lo declaro , me ayudan porfa voy a poner el codigo que va en mi aspx

Sub Getinforme(Sender As Object, E As EventArgs)



fechai= dia_i.selectedItem.text & "/" & mes_i.selectedItem.text & "/" & ano_i.selectedItem.text

fechaf= dia_f.selectedItem.text & "/" & mes_f.selectedItem.text & "/" & ano_f.selectedItem.text


Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter

MyConnection = New SqlConnection("server=(local);database=callcenter_ net;User ID=sa;Trusted_Connection=yes")
MyCommand = New SqlDataAdapter("sp1", MyConnection)

MyCommand.SelectCommand.CommandType = CommandType.StoredProcedure

MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@Beginning_Date", SqlDbType.DateTime))
'MyCommand.SelectCommand.Parameters("@Beginning_Da te").Value = BeginDate.SelectedDate
MyCommand.SelectCommand.Parameters("@fechai").Valu e = BeginDate.SelectedDate

MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@Ending_Date", SqlDbType.DateTime))
'MyCommand.SelectCommand.Parameters("@Ending_Date" ).Value = EndDate.SelectedDate
MyCommand.SelectCommand.Parameters("@fechaf").Valu e = endDate.SelectedDate

DS = new DataSet()
MyCommand.Fill(DS, "Sales")

MyDataGrid.DataSource=DS.Tables("Sales").DefaultVi ew
MyDataGrid.DataBind()
End Sub
  #2 (permalink)  
Antiguo 09/11/2004, 00:31
 
Fecha de Ingreso: octubre-2004
Mensajes: 258
Antigüedad: 19 años, 6 meses
Puntos: 1
no has haco un DIM para fechai, ese es el problema, debes declarar esa variable
__________________
Salute !!!
RollBack
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:16.