TextBox return wrong value from database

  • Thread starter Thread starter Adeczko
  • Start date Start date
A

Adeczko

Guest
I have simple procedure in sql:

ALTER PROCEDURE AB.TicketPrice @name varchar(50)ASBEGIN SELECT VALUE FROM AB.Price WHERE Name = @name;END;


I use it as TableAdapter and I want load price value.

I have a TextBox with name of ticket: "Nomal Ticket". In DB is the same.

And I have an empty TextBox where I want load price with this code:


{ CinemaDataSetTableAdapters.PriceTicketTableAdapter tmp = new CinemaDataSetTableAdapters.PriceTicketTableAdapter(); int price; string priceS; price = tmp.Fill(cinemaDataSet.PriceTicket, NormalTextBox.Text); priceS = price.ToString(); TESTtextBox.Text = priceS; MessageBox.Show(priceS); // I check value}


Please help me ladies and gentlemen :)

Continue reading...
 
Back
Top