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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql possibly not working

Status
Not open for further replies.

dinster

Programmer
Apr 12, 2007
54
GB
Hi just wondered if any of u cud have a look at this sql and tell me whats wrong with it?

It doesnt seem to be working...
Code:
sql2 = "UPDATE Users SET Users.[Password] = '" & newpassword & "', Users.[Password expiry] = #" & DateAdd("d",90,Now()) & "# WHERE (((Users.[Login ID])='" & login & "'))"

many thanks
 

Seems ok to me too!

sql2 = "UPDATE Users " & _
"SET [Password] = '" & newpassword & "', " & _
"[Password expiry] = #" & DateAdd("d",90,Date()) & "# " & _
"WHERE [Login ID]='" & login & "';"

Do you have an error? (Number & Description)
 
it says "Operation must use an updateable query"

am at loss what it can be...

any other suggestions
 
Hi found the solution....

It was permissions on the folder where the database is held. It didnt have any read or write permissions..

There are several possible reasons for this :

>


Inappropriate permissions set on the directory containing the database. IUSR privileges must be set to "read/write".



The permissions on the database itself do not have full read/write privileges in effect.



This error can also occur when the database is located outside of the inetpub/ directory. Though the information is still able to be viewed and searched, it cannot be updated unless it is in the directory.
 

The table USERS is local? BTW Users & Password are reserved words used by access. Avoid nameing tables/fields/queries as reserved words. Data is a very common one, too
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top