Hello,
I have a few tables that uses access, I am working on allowing them to edit the data. I have a page that allows the user to select which data they want to edit now I need to choose the table that contains the data.
Below is the code I have that is failing.
as you can see I am getting the table name form a form on the prvious page. Is is possible to choose the table from a variable?
Thanks
I have a few tables that uses access, I am working on allowing them to edit the data. I have a page that allows the user to select which data they want to edit now I need to choose the table that contains the data.
Below is the code I have that is failing.
Code:
%@ language=JScript %>
<!-- #include file="adojavas.inc" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Form Choice</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<%
var table = Request.form("table");
var umail = Session("Umail")
var connect = Server.CreateObject("ADODB.Connection");
var record = Server.CreateObject("ADODB.RecordSet");
connect.Open("DSN=hhhba");
record.Open("select * from " +table+" where EmailAddress ='"+umail+"'", connect, adOpenKeyset,adLockOptimistic);
%>
</head>
<body>
<center>
</center>
</body>
</html>
Code:
record.Open("select * from " +table+" where EmailAddress ='"+umail+"'", connect, adOpenKeyset,adLockOptimistic);
Thanks