I have a MS Access database named result.mdb
My code in VBScript is here :
"In the bold part is error part but it works fine in IE but through error in crome, mozila ect"
<%
opt_b = request("batch")
Dim con,rec,path,sql,vpath,cons,reca
Set con = Server.CreateObject("ADODB.Connection")
path = "re_result.mdb"
vpath = Server.MapPath( path )
cons = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & vpath & ""
con.open cons
Set rec_name = Server.CreateObject("ADODB.Recordset")
if(opt_b = "") then
'response.write("No batch available for this course")
else
sql_tbl_n = "select table_name from Master_Record where course='"& opt_c &"' and batch_code='"& opt_b &"'"
rec_tbl_n.Open sql_tbl_n,con
if rec_tbl_n.bof or rec_tbl_n.eof then
response.write "no records."
else
rec_tbl_n.movefirst
tbl_name = rec_tbl_n(0)
'response.write(tbl_name & "<br>")
end if
sql_name = "select Name, Roll_No from
" & tbl_name & " group by Name, Roll_No "rec_name.Open sql_name,con
if rec_name.bof or rec_name.eof then
n_flag = 0
else
n_flag = 1
rec_name.movefirst
end if
%>