I'm running javascript client side over a Lan. I want to run write the results from a form into an Access 97 db.
I am currently getting the following error: "No Value given for one or more required parameters." However, I added an alert message to confirm sql statement and its values were correctly being sent.
I'm now starting to think there is something wrong with my 'rst.open' statement.
Currently nothing is writing to database fields. I'm rather new to this and learning as I go. Can someone plz tell me what I am missing?
<SCRIPT type=text/javascript>
function CheckPassword(){
var polnum
var appnam
var relshp
var rst
var conn
var sql
polnum = document.main.PWD1.value;
appnam = document.main.appnam.value;
relshp = document.main.relshp.value;
rst = new ActiveXObject("ADODB.Recordset");
conn = new ActiveXObject("ADODB.Connection");
conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\server\\folder\\TESTDB.mdb");
sql = "INSERT INTO TBL_REFERRALS (REFNO, APPNAME, UWRTR) VALUES (" + polnum + ", " + appnam + ", " + relshp + ")";
alert(sql);
rst.Open (sql, conn, 1, 3);
alert("It worked!!");
rst.Close;
conn.Close;
}
</script>