19/12/2006, 11:00
|
| | | Fecha de Ingreso: enero-2005
Mensajes: 268
Antigüedad: 20 años Puntos: 0 | |
Re: Error: Tiempo de espera caducado este es mi inicio
____________
Dim cmd As New SqlCommand
Dim ds As DataSet
Dim da As SqlDataAdapter
Dim prm As New SqlParameter
Dim dr As SqlDataReader
Private Sub LLENA_MDEUDAS(ByVal suministro As Decimal)
Dim oComm As New SqlDataAdapter("Com_FacEstDeudas_sp '" & suministro & "'", oConn)
Dim DT As New DataTable
oComm.Fill(DT)
DataGrid1.DataSource = DT
DataGrid1.DataBind()
ajma.FuncCloseConenction(oConn)
End Sub
Private Sub buscar_datgen(ByVal suministro As Decimal)
Try
Dim oConn As SqlConnection = ajma.FuncOpenConnection
cmd.CommandText = "Com_FacEstDeudas_sp "
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = oConn
prm = cmd.Parameters.Add("@cIdSuministro_TMP", SqlDbType.Decimal)
prm.Direction = ParameterDirection.Input
prm.Value = suministro
prm = cmd.Parameters.Add("@Ind", SqlDbType.Char)
prm.Direction = ParameterDirection.Input
prm.Value = "G"
dr = cmd.ExecuteReader
If dr.Read Then
txtsuministro.Text = suministro
cidTarif.Text = dr.GetString(1)
cidestconexion.Text = dr.GetString(2)
Cliente.Text = dr.GetString(3)
direccion.Text = dr.GetString(4)
servicio.Text = dr.GetString(5)
codcatastral.Text = dr.GetString(6)
' totalcred.text = dr.GetString(7)
cidsuministro.Text = suministro
txtmsn.Text = "Número de Suministro Ubicado..."
End If
Catch ex As Exception
txtmsn.Text = "Error: " & ex.Message
End Try
End Sub
___________
>>
este es el evento de darle click al botòn para empezar a buscar el id en la base de datos.
__________
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'clean
txtmsn.Text = "Buscándo Número de Suministro, porfavor espere..."
cidestconexion.Text = ""
cidsuministro.Text = ""
cidTarif.Text = ""
Cliente.Text = ""
codcatastral.Text = ""
direccion.Text = ""
servicio.Text = ""
'show
cidestconexion.Visible = True
cidsuministro.Visible = True
cidTarif.Visible = True
Cliente.Visible = True
codcatastral.Visible = True
Conexion.Visible = True
DataGrid1.Visible = True
direccion.Visible = True
Label9.Visible = True
lblCliente.Visible = True
lblcodcatastral.Visible = True
lbldireccion.Visible = True
lblservicio.Visible = True
servicio.Visible = True
Tarifa.Visible = True
'actions
LLENA_MDEUDAS(CDec(txtsuministro.Text))
DataGrid1.CurrentPageIndex = 0
buscar_datgen(CDec(txtsuministro.Text))
txtsuministro.Text = ""
End Sub
__________
>>
este es el data grid donde se almacena lo ubicado
__________
Private Sub DataGrid1_PageIndexChanged(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEvent Args)
DataGrid1.CurrentPageIndex = e.NewPageIndex
LLENA_MDEUDAS(CDec(txtsuministro.Text))
End Sub
____________
ENTONCES MI PREGUNTA VA... CÒMO INTRODUSCO TU CODIGO EN ESTE SCRIT???
GRACIAS SHIMITO
__________________ creando conciencia Nacionalista...!!!!! :si: |