Hi,
I am working on a file uploader. Everything is working as intended, however I need to do some file validation on it across a database.
I got the database to open the connection and get the values in a recordset, however I cannot take the filename that I choose to upload to find the name against the recordset.
Can someone help me how to validate the file name that the user chooses against the recordset?
Thanks,
Khan
I am working on a file uploader. Everything is working as intended, however I need to do some file validation on it across a database.
I got the database to open the connection and get the values in a recordset, however I cannot take the filename that I choose to upload to find the name against the recordset.
Code:
function CuteWebUI_AjaxUploader_OnSelect(files) {
<%
Set AdoCon=Server.CreateObject("ADODB.Connection")
Set AdoRec=Server.CreateObject("ADODB.Recordset")
AdoCon.ConnectionString="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=******;Initial Catalog=AFDDB_DEVY;Data Source=MOMENTUMTEST"
AdoCon.Open
AdoRec.Open "Select Custid from APPLICATION",AdoCon
str=AdoRec.GetString()
%>
for (var i = 0; i < files.length; i++) {
var name = files[i].FileName;
if (str!=name) {
files[i].Cancel();
}
}
<%
AdoRec.close
AdoCon.close
set AdoRec = Nothing
set AdoCon = Nothing
%>
}
Can someone help me how to validate the file name that the user chooses against the recordset?
Thanks,
Khan
Comment