Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name Redefined 1

Status
Not open for further replies.

rjn2001

Programmer
Dec 29, 2004
172
GB
Can anyone help with this, the error is below, and the code is below that. Thanks!

Code:
Microsoft VBScript compilation error '800a0411' 

Name redefined 

/privatepageJob.asp, line 16 

Dim strSQL 			'Database query sring
----^

Code:
<!--#include file="security.asp" -->
<!--#include file="md5.asp" -->
<%

'File: authorised.asp
'Description: Authorised Page


'Make sure this page is not cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"

Dim strSQL 			'Database query sring
Dim strUserName 	'Holds the user name
Dim strPassword		'Holds Password
Dim strJobDateStart		'Holds Job Start Date
Dim strJobDateFinish	'Holds Job End Date
Dim strJobDescription	'Holds Job Description
Dim strJobRole		'Holds Job Role

strUserName = Request.Form("UserID")
strPassword = Request.Form("Password")

Dim rand			'Holds Encrypt Key of Password
Dim objMD5			'Holds Object MD5

Set objMD5 = New MD5
objMD5.Text = strPassword
rand = objMD5.HEXMD5


'Create a recordset object
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
'strSQL = "Update * From tblJob WHERE tblUsers.[UserID] ='" & strUserName & "'"

strSQL = "UPDATE tblJob SET tblUsers.[Password] = '" & StrPassword & "' , tblJob.JobDatesStart = '" & strJobDatesStart & "' , tblJob.JobDateFinish = '" & strJobDateFinish & "' , tblJob.JobDescription = '" & strJobDescription & "' ,  tblJob.JobRole = '" & strJobRole & "' ,WHERE tblUsers.[UserID] ='" & strUserName & "'"


'Query the database
rsCheckUser.Open strSQL, strCon
%>

Richard Noon
 
you are declaring the variable strSQL in this page but are you also declaring it in either of your include files? It should only be declared once.

Tony
________________________________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top