B
Ben
Hi,
When clicking on a button, a new record must be created in an Access table.
See my code:
<%
set objdc = Server.CreateObject("ADODB.Connection")
objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
=c:\access\mydb.mdb")
%>
<html><head><title></title></head><body>
<INPUT id=test TYPE="button" value="go">
<script language=vbscript>
sub test_onclick()
a=inputbox ("enter your name")
b=inputbox("enter your email")
end sub
</script>
<%
strsql = "insert into mytable (name, email) values('" & a & "','" & b & "')"
objconn.execute strsql, , adcmdtext and adcmdexecutenorecords
%>
....
This doen't work. How to pass values inside 'a' and 'b' to ASP?
Thanks
Ben
When clicking on a button, a new record must be created in an Access table.
See my code:
<%
set objdc = Server.CreateObject("ADODB.Connection")
objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
=c:\access\mydb.mdb")
%>
<html><head><title></title></head><body>
<INPUT id=test TYPE="button" value="go">
<script language=vbscript>
sub test_onclick()
a=inputbox ("enter your name")
b=inputbox("enter your email")
end sub
</script>
<%
strsql = "insert into mytable (name, email) values('" & a & "','" & b & "')"
objconn.execute strsql, , adcmdtext and adcmdexecutenorecords
%>
....
This doen't work. How to pass values inside 'a' and 'b' to ASP?
Thanks
Ben