Any expert can solve this??
Error message will occur during execution, is something related to sql. the program will show an error on objcommand.executeNonQuery. Can solve this?
Imports System
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Inherits System.Windows.Forms.Form
Dim objConnection As SqlConnection = New _
SqlConnection("server=(local);database=uni;" & _
"Integrated Security=True")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objCommand As SqlCommand = New SqlCommand
objCommand.Connection = objConnection
objCommand.CommandText = "INSERT INTO login" & _
"(user,Password)" & _
"VALUES('steven','123456')"
objConnection.Open()
objCommand.ExecuteNonQuery()
objConnection.Close()
End Sub
End Class