If you not sure of the connection string, choose Data Environment in VB and then add a connection then select SQL Simple Provider and then choose your DB then click properties of the connection and copy the connection string.
conn.BeginTrans
FirstName = "Delton"
LastName =Phill"
Department = "Technology"
NewExtNo = "6342"
Comments = "Delton is employed to the company as a programmer"
With comm
Set .ActiveConnection = conn
.CommandType = adCmdStoredProc
.CommandText = "INSERTINFO"
.Parameters.Refresh
.Parameters("@chFirstName".Value = FirstName
.Parameters("@chFirstName".Direction = adParamInput
.Parameters("@chLastName".Value = LastName
.Parameters("@chLastName".Direction = adParamInput
.Parameters("@chDepartment".Value = Department
.Parameters("@chDepartment".Direction = adParamInput
.Parameters("@chNewExtNo".Value = NewExtNo
.Parameters("@chNewExtNo".Direction = adParamInput
.Parameters("@chComments".Value = Comments
.Parameters("@chComments".Direction = adParamInput
.Execute
End With
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.