I am making a connection to an access db. On my machine I have no problem writting to the database from my javascript.
The problem exists when other users try to write to it.
Once the user selects ‘yes’ the ADO security warning popup happens. If the user selects ‘ok’ nothing happens, if the user hits ‘cancel’ nothing happens.
Why is this erroring out?
I have attached the popup.
function onSubmit(t)
{
var AOI = document.getElementsByName(“AOI”);
var Layer = document.getElementsByName(“Layer”);
var AIOholder = AOI[0];
var Layerholder = Layer[0];
var myConnect = “Provider=Microsoft.Jet.OLEDB.4.0; Data Source=”+DBPath;
var ConnectObject = new ActiveXObject(“ADODB.Connection”);
var sql=”SELECT * FROM 1_OverView_Board_For_Status WHERE AOI = ‘” + AIOholder.value + “‘ ;”;
ConnectObject.Open(myConnect);
var RS = ConnectObject.Execute(sql);
var fieldCount = RS.Fields.Count;
var recordCount = RS.Fields.Count;
var x = 0;
var header;
var getFieldNames = false;
while (x <= recordCount-1)
{
if( RS.Fields(x).Name == Layerholder.value)
{
alert(“Thank you for the submit.”);
win3.close();
if(t==1)
{
var sql2 =”UPDATE 1_OverView_Board_For_Status SET “+ RS.Fields(x).Name +” = ‘QC’ WHERE AOI ='” +AIOholder.value +”‘;”;
RS =””;
var RS = ConnectObject.Execute(sql2);
}
}
x++
}
RS.Close();
ConnectObject.Close();
return;
}
Thanks!
[upl-file uuid=2c20c500-97ab-41d2-bf24-f36e547289f1 size=14kB]error.JPG