Visual Basic - vbasic/sql

Life is soft - evento anual de software empresarial
 
Vista:

vbasic/sql

Publicado por KBRA (14 intervenciones) el 10/05/2006 16:51:31
hola,m gustaria saber komo guardar la longitud d un fichero en una variable sin saber k longitud tiene el fichero,logicamente.
Y un problemilla q tengo...al cargar un listado,m coje los datos d una linea mas arriba,por ejemplo:
NOMBRE DIRECCION C.P.
pablo c/mayor 1 00001
oscar av.madrid 2 00002
manel av.barcelona 3 00003

si selecciono en el combobox a oscar, en el textbox m sale la direccion y el cp d pablo, y si elijo a manel m sale el d oscar y asi sucesivamente...os djo el kodigo

Private Sub carga_dades()
Dim csql As String
csql = "select * from empresa where codigo_empresa=" & cmb_codi_emp.Text
Set rst = cn.Execute(csql)
If Not rst.EOF Then
tdireccio.Text = "" & rst!direccio_envio
If Not IsNull(rst!cod_postal_envio) Then tcp.Text = rst!cod_postal_envio
tpoblacion.Text = rst!localitat_envio
If Not IsNull(rst!Provincia_Envio) Then
tProvincia.Text = "" & rst!Provincia_Envio
Else
tProvincia.Text = rst!Provincia
End If
End If
csql = "select * from personal where codigo_empresa=" & cmb_codi_emp
Set rst = cn.Execute(csql)
While Not rst.EOF
cmdTrabajador.AddItem rst!nom_pers & " " & rst!ape1_pers & " " & rst!ape2_pers
rst.MoveNext
Wend
End Sub

gracias =)
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder