Hi,
Am trying to connect and insert a record into my database using vb.net this is my code:
the problem is ra = 0 mean no insertion made I can't figure it out!
thank's in advance
Am trying to connect and insert a record into my database using vb.net this is my code:
Code:
cs = New SqlConnection("Data Source=AYACHMOHAMED;Initial Catalog=Employe;Integrated Security=True")
cs.Open()
sqlcom = New SqlCommand("INSERT INTO EMPLOYE VALUES 3, 'AYACH', 'PDG'", cs)
Try
ra = sqlcom.ExecuteNonQuery()
Catch ex As Exception
MsgBox("wrong " & ra)
End Try
cs.Close()
thank's in advance
Comment