0

Hi

I am developing a windows application.

For your infomation

FRONT END : C# (VISUAL STUDIO 2008)
BACKEND : SQL SERVER 2008

In a single form I have an option for add and remove client. Two different buttons are used(Add and delete clients).

When I click on Add button the particular client details are entered into the textboxs and is added to the database.

If I wish to view the same client details i have just added , I have to close the form and again re-open it just to view the client details . If I dont close and re-open the newly entered client is not populated to the combo box.

Can someone please help me out :)

2
Contributors
1
Reply
4
Views
5 Years
Discussion Span
Last Post by dualzNZ
1

so when the button is clicked it sends the results to MSSQL table in your database, assuming its ADO.

pass the combobox data to a method

public method methodname()
{
    // run your population for your combobox here
}

on your button_click event add after your SQL INSERT STATEMENT, methodname();

this will first insert the data into the table then popluate the combox with your SELECT query dataset

Votes + Comments
How I would do it
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.