borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Search for a directory containg certain characters)Next Topic (Can anyone help with Arrays?) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Problem with SQL statement
Poster Message
jonwiper
Level: Big Cheese

Registered: 30-03-2005
Posts: 19

icon Problem with SQL statement

Can anyone tell me the correct way to represent this.

I have an sql statement that needs to send a value to a database table but put it the field of the recordset where the username is stated.

heres what i have:


dbCommand.CommandText = "INSERT INTO Players where ((First_Name = sfirstname) and (Last_Name = sSurname)), (Level3Score) values (level3score) "


what i want is the level3score stored in the field Level3Score in the recordset where the users first and second name equal that of the current user.

any ideas please, jon

12-05-2005 at 12:58 PM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: Problem with SQL statement


"INSERT INTO Players (Level3Score) Values (" & level3score & ") WHERE ((First_Name = '" & sfirstname & "') And (Last_Name = '" &  sSurname & "'))"



____________________________
multi-tasking - the ability to hang more than one app. at the same time.

12-05-2005 at 01:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : Problem with SQL statement
Previous Topic (Search for a directory containg certain characters)Next Topic (Can anyone help with Arrays?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder