Click here to Skip to main content
15,891,689 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
i need a simple program to insert and delete data (text and a number) from text box to sql server 2005 and in Data Grid View plz help me 'm just a beginner in this..... plz help me....
Posted
Comments
Jpuckett 7-Jun-11 13:46pm    
We're not here to perform your project for you.

This is a question and answer forum, not a "do my work for me" forum.

Have a great day, and best of luck.
sr_sivaprasad 10-Jun-11 9:23am    
Jpuckett : 'm trying to learn vb.net its not my project.....
Kschuler 7-Jun-11 14:18pm    
Start working on it and let us know when you get stuck on something. If you don't even know where to start, try searching CP articles for help on the topics. Here:
http://www.codeproject.com/search.aspx?q=SQL+Server+2005+beginner
Tarun.K.S 7-Jun-11 14:36pm    
Is it a web project or windows forms project?
sr_sivaprasad 10-Jun-11 9:24am    
windows....

1 solution

Since this is your homework, it's only fair you do the work: so no code!

It isn't a difficult task: your notes will cover most if not all of it.
Just like any other problem, break it down into manageable chunks, and do them one at a time, making sure each chunk works properly before you move on:

1) Create a form or page with one or two boxes on it for the text and the number.
2) Make sure you can get the text and the number into your program once the user has entered them.
3) Create your database. You will need at least one table, with (probably) at least three columns. One for your text, one for you number, and possibly one more for an identity column, if your numbers aren't going to be unique.
4) Get your numbers from the user, and output it to the database:
4a) Create a connection to the DB, and open it.
4b) Create a command object, and give it both the connection you just opened, and a valid SQL command to insert the data.
4c) Execute the command.
4d) Dispose of the command
4e) Dispose of the connection.

Done.
 
Share this answer
 
Comments
sr_sivaprasad 10-Jun-11 9:23am    
thankz

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900