Wrong syntax near the keyword where
Incorrect syntax near ....
- Hey guys,
I would like to create a login field via MS SQLExpress. First of all, I'll follow a tutorial.
Well I created the DB & the tables too. Now I ALWAYS get the following error (I google for 4 hours ...)
"Wrong syntax near 'user'.
"A System.IndexOutOfRangeException" occurred in System.Data.dll.
Additional information: Table 0 cannot be found. "
Here is a snippet of code:
Private Function IsAuthenticated () As Boolean
'CLEAR EXISTING RECORDS
If SQL.SQLDS IsNot Nothing Then
SQL.RunQery ("SELECT Count (username) As UserCount" &
"FROM user" &
"WHERE username '" & txtUser.Text & "'" &
"AND password = '" & txtPass.Text & "' COLLATE SQL_Latin1_General_CP1_CS_AS")
If SQL.SQLDS.Tables (0) .Rows (0) .Item ("UserCount") = 1 Then
MsgBox ("Invalid user Data.", MsgBoxStyle.Critical, "LOGIN FAILED")
I've tried so many things but no chance ...
Registered: April 16, 2013
In the first part of the error line, a space is missing after As UserCount and an = character is missing after WHERE username.
- Helpful reviews
- Helpful reviews
- Programming languages used
- C # 7.x, Phyton, Processing, C, Haskell / Curry, Java
Furthermore, your query is so susceptible to an SQL injection, use DB parameters.“There's no need to" teach "atheism. It's the natural result of education without indoctrination. «- Ricky Gervais
- How do cats grow striped whiskers
- How to create a subinterface on a Cisco router
- How to do Ramzi method transvaginal ultrasound
- How much nilang mehta worth
- How To Make Pine Oil Disinfectant Formula
- What does lively woman mean?
- Lego linear drive specifies Howard
- How to connect a strike link camera
- How to Make Hogwarts School Books
- What does it mean to indulge your ambitious nature
- What does maniac mean in Arabic
- 11x7 baking dish is how many liters
- How to use hastily in a sentence
- 4 feet hero feeds like many people
- Howard, the duck stuffed animal
- How many hours to go 530 miles
- How do I install libpq-dev on a Mac
- Madalyn listener how old is Taylor
- Doctor who pays tribute to all doctors
- Arunai Temple Pehowa Hindi
- Scaletec plus instructions for binding
- Epidemic case where is copper
- Where the river flows cold chords
- What is discounting and compounding