GIVEN below is vbscript to connect to acess database and insert records into the table using forms
Private Sub Command1_Click()
Set rs = cn.Execute("insert into employee values('txtempname.text',txtempid.text,txtssn.text) ")
rs.Close
cn.Close
End Sub
Private Sub Form_Load()
datafile = "C:\mas.accdb"
With cn
.Provider = "microsoft.ACE.OLEDB.12.0"
.ConnectionString = datafile
.Open
End With
End Sub
GLOBAL SECTION
Global cn As New ADODB.Connection
Global rs As New ADODB.Recordset
Global datafile As String
I am getting error "no value given for one or more parameters ".please help me to fix this error?