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

Reserved word?

Status
Not open for further replies.

Everton1Blue

Technical User
Jun 6, 2014
41
GB
Hello

I know that 'password' is a reserved word and needs to go in square brackets, as in [password], but where do those square brackets go in something like this, please:

Code:
 Dim Sql As String = "UPDATE university SET uniqueCode='',[b]password=@password[/b] WHERE......

........

 cmd.Parameters.AddWithValue[b]("@password"[/b], txtNewPwd.Text....

Thank you for any advice.
 
Thanks jbenson001

I was thinking of password here, sorry:

Link

It is an Access DB that I have, so I would need to replace that SQL, wouldn't I?

I am getting an error on that line:

Code:
Dim Sql As String = "UPDATE university SET uniqueCode='',password=@password WHERE uniqueCode=@uniqueCode and (strEmail=@strEmail)", conn)

and have tried every combination of ) and " and thought the error may really lay elsewhere such as 'password'.

Thanks for the link!
 
Not too familiar with Access syntax... but I would try putting square brackets around password

[password]=@password

Are you getting an error?
 
Yes

Code:
Dim Sql As String = "UPDATE university SET uniqueCode='',password=@password WHERE uniqueCode=@uniqueCode and (strEmail=@strEmail)", conn)

BC30205: End of statement expected after that final bracket.

I will put password between []

Thanks
 
Hello jbenson001

The error goes if the ,conn) at the end is removed.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top