|
This one work absolutely fine with sql 2008 , can you see any difference ?.. I can't
<%@LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
<!--#include file="includes/connection.asp" -->
<!--#include file="includes/dateConversions.asp" -->
<!--#include file="includes/securityLock.asp" -->
<%
dim rs, strSQL, sDebug, action, id
dim institution, full_name, address1, address2, town, county, postcode, mobile_tel, home_tel, email, year_of_graduation
institution = trim(request.form("institution"))
full_name = trim(request.form("full_name"))
address1 = trim(request.form("address1"))
address2 = trim(request.form("address2"))
town = trim(request.form("town"))
county = trim(request.form("county"))
postcode = trim(request.form("postcode"))
mobile_tel = trim(request.form("mobile_tel"))
home_tel = trim(request.form("home_tel"))
email = trim(request.form("email"))
year_of_graduation = trim(request.form("year_of_graduation"))
full_name = Replace(full_name, "'", "''", 1, -1, 1)
address1 = Replace(address1, "'", "''", 1, -1, 1)
address2 = Replace(address2, "'", "''", 1, -1, 1)
town = Replace(town, "'", "''", 1, -1, 1)
county = Replace(county, "'", "''", 1, -1, 1)
postcode = Replace(postcode, "'", "''", 1, -1, 1)
mobile_tel = Replace(mobile_tel, "'", "''", 1, -1, 1)
home_tel = Replace(home_tel, "'", "''", 1, -1, 1)
email = Replace(email, "'", "''", 1, -1, 1)
year_of_graduation = Replace(year_of_graduation, "'", "''", 1, -1, 1)
'Set up database to enter rates
set rs = server.createobject("ADODB.RECORDSET")
'Update the record.
strSQL = "update tbl_members set "
strSQL = strSQL & "institution = " & institution & ", "
strSQL = strSQL & "full_name = '" & full_name & "', "
strSQL = strSQL & "address1 = '" & address1 & "', "
strSQL = strSQL & "address2 = '" & address2 & "', "
strSQL = strSQL & "town = '" & town & "', "
strSQL = strSQL & "county = '" & county & "', "
strSQL = strSQL & "postcode = '" & postcode & "', "
strSQL = strSQL & "mobile_tel = '" & mobile_tel & "', "
strSQL = strSQL & "home_tel = '" & home_tel & "', "
strSQL = strSQL & "email = '" & email & "', "
strSQL = strSQL & "year_of_graduation = '" & year_of_graduation & "' "
strSQL = strSQL & "where id = " & session("basrat_id")
dCmd.CommandText = strSQL
dCmd.CommandType = 1
set rs = dCmd.execute
set rs = nothing
set dCmd = nothing
response.redirect("main.asp")
%>
|