New to vb and tried the below code. searched for solutions in google. But im confused with the results.So im posting in SO.
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim cmd As ADODB.Command
Dim statement As String
Private Sub cmd_update_Click()
con.Open "Provider=SQLOLEDB;Data Source=STPLSVR06.syrmatech.local;Initial Catalog=BVM;Database=Bluestar;uid=sa;pwd=STPLadmin098;"
rs.Open = "insert into Test_Duct values(txt_Board_SrNo.Text,txt_Test_DateTime.Text,txt_User_Name.Text,txt_Communication_status.Text,txt_WatchDog_Status.Text,txt_VoltMes.Text,txt_VoltStatus.Text)"
rs.Close
con.Close
End Sub
I used this code from a video and I get an compiler error in "rs.open" statement. I will be thankful if any of u can give an good insert command or help in finding whats the error.