I Have a problem with a prepared statement in C#:
OdbcCommand cmd = sql.CreateCommand(); cmd.CommandText = \"SELECT UNIQUE_ID FROM userdetails WHERE USER_ID
Use '@USER_ID' instead of '?' and all should work:
OdbcCommand cmd = sql.CreateCommand(); cmd.CommandText = "SELECT UNIQUE_ID FROM userdetails WHERE USER_ID = @USER_ID"; cmd.Parameters.Add("@USER_ID", OdbcType.VarChar, 250).Value = email;