Hey Guys,
So I'm creating a small application that I could use some help with. I want my C# app to connect to a database and then run a command with the values that a user enters. Look at the below example:
A guys name is John Smith and he's 35. In the application I've set let's say string name=namebox.text or whatever as well as done the same for age. How would I run a create command on mysql or update a mysql command using the variables?
Like so:
INSERT INTO mydb (name, age) VALUES(name, age);
Or
Select * from mydb (name,age) where age = "age";
By "age" I of course mean the user inputted age, The problem is mysql requires the "" around the value and vb will attempt to recognize it as a literal text command. Any help is appreciated. Thanks!
So I'm creating a small application that I could use some help with. I want my C# app to connect to a database and then run a command with the values that a user enters. Look at the below example:
A guys name is John Smith and he's 35. In the application I've set let's say string name=namebox.text or whatever as well as done the same for age. How would I run a create command on mysql or update a mysql command using the variables?
Like so:
INSERT INTO mydb (name, age) VALUES(name, age);
Or
Select * from mydb (name,age) where age = "age";
By "age" I of course mean the user inputted age, The problem is mysql requires the "" around the value and vb will attempt to recognize it as a literal text command. Any help is appreciated. Thanks!


