
01/02/2005, 14:49
|
| | Fecha de Ingreso: febrero-2005
Mensajes: 1
Antigüedad: 20 años, 3 meses Puntos: 0 | |
Comando Execute Tengo el siguiente codigo la conexion esta hecha en un modulo el problema es que no me permite guardar nuevos datos en la B.D (sql) Sale error en la linea <<<<<< CN.Execute COM<<<<<<<¿cual es el problema ?
Public CN As New ADODB.Connection
Public Sub MAIN()
CN.Provider = "SQLOLEDB"
CN.ConnectionString = "user id=sa;" + _
"password=;data source=(local);" + _
"initial catalog=ventas"
CN.Open
MDIForm1.Show
End Sub
Private Sub CMDGRABAR_Click()
COM = "insert into producto (cod_prod," + _
"descrip,precio,precio_cos, stock," + _
"stock_min, fecha_ing, fgeli) values " + _
" ('" + Text1 + "','" + Text2 + " ', " + _
Text3 + " , " + Text4 + " , " + _
Text5 + " , " + Text6 + " ,'" + _
Text7 + "',0 ) "
CN.Execute COM
Text8 = COM
End Sub |