hawk
Member
- Joined
- Sep 6, 2008
- Messages
- 8
- Programming Experience
- Beginner
Hello everyone,
I'm having great difficulty inserting information into my database.
I'm hoping to insert into the table test and field alt the information in my textbox txtalt, but I just get the @alt inserted.
Any Ideas?
thanks
I'm having great difficulty inserting information into my database.
I'm hoping to insert into the table test and field alt the information in my textbox txtalt, but I just get the @alt inserted.
Any Ideas?
thanks
VB.NET:
Dim myConnString = ";" & _
"Database=;" & _
"Uid=;" & _
"Pwd=;" & _
"Connect Timeout=30;"
Dim myconnection As New MySqlConnection(myConnString)
Dim command As New MySqlCommand("INSERT INTO test (alt) VALUES ('@alt')", myconnection)
command.Parameters.AddWithValue("@alt", txtalt)
myconnection.Open()
command.ExecuteNonQuery()
myconnection.Close()