Visual Basic - Ayuda con SQL URGENTE

Life is soft - evento anual de software empresarial
 
Vista:

Ayuda con SQL URGENTE

Publicado por Mario Urzua (11 intervenciones) el 30/04/2003 23:27:06
Tengo problemas con una SQL que estoy haciendo,
el problema es que me modifica la informacion de toda la tabla
y no solo del registro que yo quiero, ademas le agregue la opcion WHERE
para que solo me modifique es registro pero no lo hace

Sql = "UPDATE Secreduc SET Secreduc.Nombres = '" & Nombres.Text & "',"
Sql = Sql & "Secreduc.Apellidos = '" & Apellidos.Text & "',"
Sql = Sql & "Secreduc.Departamento = '" & Depto.Text & "',"
Sql = Sql & "Secreduc.Seccion = '" & Seccion.Text & "',"
Sql = Sql & "Secreduc.Tecnico = '" & Tecnicos.Text & "',"
Sql = Sql & "Secreduc.Marca = '" & Marca.Text & "',"
Sql = Sql & "Secreduc.Modelo = '" & Modelo.Text & "',"
Sql = Sql & "Secreduc.Cpu = '" & Cpu.Text & "',"
Sql = Sql & "Secreduc.Ram = '" & Ram.Text & "',"
Sql = Sql & "Secreduc.Hdd = '" & Hdd.Text & "',"
Sql = Sql & "Secreduc.Computername = '" & ComputerName.Text & "',"
Sql = Sql & "Secreduc.SistOperativo = '" & Sistema.Text & "',"
Sql = Sql & "Secreduc.office = '" & Office.Text & "',"
Sql = Sql & "Secreduc.Rut = '" & Rut.Text & "',"
Sql = Sql & "Secreduc.FechaServicio = '" & CDate(FecSolicitud.Text) & "',"
Sql = Sql & "Secreduc.SopTerreno1 = '" & SopTerre & "',"
Sql = Sql & "Secreduc.SopSistema1 = '" & SopSis & "',"
Sql %
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

RE:Ayuda con SQL URGENTE

Publicado por Versage (202 intervenciones) el 01/05/2003 17:59:13
EL wHERE

DEBE SER DONDE EL REGISTRO QUE SELECIONASTE SEA IGUAL AL ID DE TU TABLA.

CUANDO SELECCIONAS UN REGISTRO DEBES ATRAPAR EL ID DEL REGISTRO PARA PODERLO IDENTIFICAR.

UPDATE TABLA CAMPO = ' "& MODIFICACION &"' WHERE condicion
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar