B
Barnes
I have an asp form that sends data to a redirect page with SQL using JScript. There is a function that I'm using called replace(). The form submits without errors and goes to the redirect page but the data doesn't populate the SQL database. Instead, referrs to the last key ID.
------------------------
<%
function replace(string)
{
var pattern = /\'/g;
var newString = string.replace(pattern, "''");
// Create a database connection.
//Database.Open ("dsn=INTRANET");
// Create a recordset of all information in this table.
// Construct the SQL Query
strSQL = "INSERT INTO " + ...
DirectoryRecordSet.Open (strSQL, Database);
return newString
}
%>
------------------------
<%
function replace(string)
{
var pattern = /\'/g;
var newString = string.replace(pattern, "''");
// Create a database connection.
//Database.Open ("dsn=INTRANET");
// Create a recordset of all information in this table.
// Construct the SQL Query
strSQL = "INSERT INTO " + ...
DirectoryRecordSet.Open (strSQL, Database);
return newString
}
%>