Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

TextBox return wrong value from database

$
0
0
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 :)

Viewing all articles
Browse latest Browse all 2535

Trending Articles