View Single Post
  #4 (permalink)  
Old April 25th, 2004, 09:33 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Andy,

In that case, tell your lecturer he/she is wrong, and point him to this page to illustrate your point: http://support.microsoft.com/default.aspx?kbid=222135

The driver you're using is old and shouldn't really be used anymore as it's slower and has some issues. From the article:
Quote:
quote:The Microsoft Access ODBC driver (Jet ODBC driver) can have stability issues due to the version of Visual Basic for Applications that is invoked because the version is not thread safe. As a result, when multiple concurrent users make requests of a Microsoft Access database, unpredictable results may occur. The native Jet OLE DB Provider includes fixes and enhancements for stability, performance, and thread pooling (including calling a thread-safe version of Visual Basic for Applications).
Anyway, to return to your problem: you're not adding a user name to the update statement:
Code:
SQLQuery2 = "UPDATE users SET newpassword2 = '" &  newpassword2 & "' WHERE username = '"
As you can see, the SQL statement ends right after username = '.
To fix this, change the statement to this:
Code:
SQLQuery2 = "UPDATE users SET newpassword2 = '" &  newpassword2 & "' WHERE username = '" & username & "'"
You also did that for the SELECT statement, so the idea should be familiar.

If you post code here, can you please use the [code][/code] tags? That makes the code much easier to read.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.


Reply With Quote