Visual Basic - Sql Injection

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

Sql Injection

Publicado por Edwin (303 intervenciones) el 02/06/2006 16:34:51
Hola a todos quisiera saber como puedo realizar modificaciones a mi base de datos por medio de Sql Injection.

Por ejemplo:

Tabla.-------------------------> Envio

Tengo un cuadro de texto con un command

El cuadro de texto lee las comillas simples.

Al dar click al command debe mostrar el envio del texto y mostrar sus resultados.

Aqui viene el asunto como puedo hacer para alterar esta instruccion, como por ejemplo, insertar,actualizar y entre otras cosas.

_________________
|Gracias de Antemano|
|_________________|
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

sql

Publicado por csdk (127 intervenciones) el 14/06/2006 22:04:28
obj coneccion///////////////////////
Public RST_EMPLEADO As New Recordset
Public RST_NIVEL As New Recordset
Public ADOCONN As New ADODB.Connection 'CONEXION*************
Public Function conex()
On Error Resume Next
ADOCONN.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=" + App.Path + "\CONTRATOS.mdb"
ADOCONN.Open

If Err.Number Then

MsgBox "Se ha producido el siguiente error:" & vbCrLf & _
Err.Number & ", " & Err.Description
End
End If
End Function
Public Function desconectar()
ADOCONN.Close
End Function

insertar////////////////////////////////////////////////////////
Call conex
RST_EMPLEADO.Source = "INSERT INTO TB_CON VALUES('" & TXT_NOM.Text & "','" & TXT_NACIO.Text & "','" & TXT_EDAD.Text & "','" & TXT_EDOCIVIL.Text & "','" & TXT_DOMI.Text & "','" & TXT_PUESTO.Text & "'," & TXT_SALARIO.Text & "," & TXT_POR.Text & "," & TXT_VAC.Text & "," & TXT_ASIG.Text & ",'" & Combo1.Text & "','" & Combo2.Text & "' ,'" & DTPicker1.Value & "','" & TXT_GT.Text & "','" & Combo3.Text & "' , '" & Combo4.Text & "'," & TXT_CVL_EMP.Text & ")"
RST_EMPLEADO.ActiveConnection = ADOCONN
MsgBox "REGISTRO ALMACENADO", vbInformation
RST_EMPLEADO.Open
desconectar

"Actualizar" /////////////////////////////////////////////////////////////////////////////////////////
conex
RST_NIVEL.Source = "Update tb_CON set nombre_COMPLETO = '" & Txt_Nombre.Text & "',s_diario =" & cosa2 & ", curp ='" & Txt_Curp.Text & "',RFC='" & Txt_Rfc.Text & "',cvl_nivel=" & CVL_N & ",cvl_seccion=" & CVL_S & ",puesto='" & Cbo_Puesto.Text & "',tS=" & cosa & " WHERE cvl_empleado ='" & txt_AcEm.Text & "'"
RST_NIVEL.ActiveConnection = ADOCONN
RST_NIVEL.Open
MsgBox ("El registro se a modificado"), vbInformation

desconectar
baja///////////////////////////////////////
conex
RST_EMPLEADO.Source = "delete from tb_CON where cvl_emp=(" & TXT_CVL_EMP.Text & ")"
RST_EMPLEADO.ActiveConnection = ADOCONN
RST_EMPLEADO.Open
desconectar
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