SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table in database

I want to use a webpart to add, delete and udate data from database table

I can create a custom webpart with a gridview

but is there out of box webpart in 2007 sharepoint I can use ???

share|improve this question

I suggest you to use BDC (Business Data Catalog) in Sharepoint 2007. BCS is an upgraded version of BDC in Sharepoint 2010. So since you are using 2007, you should look for BDC.

You can use the BDC Web Parts to View, Update, Create, Delete items to the database.

Here is a tutorial to get you started:

share|improve this answer

what you are looking for is business connectivity services. now I am not sure if this existed with the same functionality in 2007.

share|improve this answer

No not that i know of! any way that you chose you would need to create some code! there are alot of examples out there on the net!

For your issue it shouldnt be hard atall! just create three stored procedures for each task in SQL server, make sure you give each stored procedure the correct permission.

create your custome webpart and call the stored procedures from there!

somthing similar to this ;)

you can follow luis route:

Creating a Database Connection by Using the Business Data Catalog Definition Editor


for sql commands

to add buttons to webpart:

in create child controls even add:

protected override void CreateChildControls()
   //create a new button object
   Button btngo = new Button();
   //give the button some text to show
   btngo.Text = "GO";
   //create the button click event
   btngo.Click +=new EventHandler(btngo_Click);

   //add button to control list to display

//do what you want in the click event for the button
private void btngo_Click(object sender,EventArgs e)
     //do what you want here on button click ;)       
share|improve this answer
thakn yours, but codeproject is not letting me add or delete to table in sql ??? – Mathematics Apr 24 '13 at 11:39
thats beacsue they are using // SQL connection string. string sql = "select CustomerID,FirstName, LastName from SalesLT.Customer where FirstName like 'o%'"; – ali Sharepoint Apr 24 '13 at 11:44
you need to add another two sql strings for adding and deleting ;) – ali Sharepoint Apr 24 '13 at 11:44
for all the commands you need look here… – ali Sharepoint Apr 24 '13 at 11:46
problem is not with commands sql therefore how i add buttons to webpart ???? – Mathematics Apr 24 '13 at 11:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.