I have a Case Select Statement that is selecting what item price goes with what item. (Long and complicated, but this is what I need to do.)
I want to use the result from that Case Select to update the database with the price.
Here's the Case Statement
Code:
'--Logo Price based on LogoOption
Dim mySqlConn8 as SqlConnection
Dim mySqlCmd8 as SqlCommand
Dim LogoID as Integer
Dim LogoPrice as String
mySqlConn8 = new SqlConnection("DNS")
mySqlCmd8 = new SqlCommand("SELECT LogoPrice FROM Logo", mySqlConn8)
mySqlConn8.Open()
Select Case(LogoPrice)
Case LogoID = 1
LogoPrice = "4.25"
Case LogoID = 2
LogoPrice = "4.25"
Case LogoID = 3
LogoPrice = "1.10"
Case LogoID = 4
LogoPrice = "1.10"
Case LogoID = 5
LogoPrice = "0.00"
End Select
mySqlConn8.Close()
And here is the update statements I'm using.
Code:
UpdateCMD.Parameters.Add("@LogoPrice", SqlDbType.Money, 8).Value = LogoPrice.Text
How do I get the result from the Case Statement to my Update Statement? I know its syntax, and I have tons of problems with syntax. I also know I probably didn't put the right code blocks here for you to look at. Just let me know what you need.
Help!