Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How to insert textbox values in database using ADO within the VB.NET forums, part of the Software Development category; How to insert textbox values in the database using ADO connections in VB Question asked by visitor Durga Prasad.Argi...
|
|||||||
|
|||
|
Re: How to insert textbox values in database using ADO
i understand wat ur saying
first open a window form and create a textbox in the form and create a one button and create a database for ur textbox in button click write a below code dim oc as oledbconnection oc= new loedbconnection("") \\ in brackets write the database link dim cmd as oledbcommand cmd=new oledbcommand("") \\ in brackets write insert command (ex:insert into tablename values('" & textbox1.text & "')",oc) try oc.open() cmd.executenonquery() catch e as exception if(oc.state=connectionstate.open) then oc.close() now u enter data intextbox and click button the data is displayed in ur database ok bye |
|
|||
|
Re: How to insert textbox values in database using ADO
dim oc as oledbconnection
oc= new loedbconnection("") \\ in brackets write the database link dim cmd as oledbcommand cmd=new oledbcommand <<<< could also change this part to call a stored procedure ... and then below execute the name of the stored proc, to make server the work for you. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| insert picture to table | rashinkar | Oracle | 9 | 04-25-2009 11:53 AM |
| Add a new column to a table and insert values | Ajit Kumar Maharatha | Oracle | 11 | 12-12-2008 10:58 AM |
| Cannot identify the object "TextBox" | Geek_Guest | QTP | 3 | 04-20-2007 12:47 PM |
| textbox TextChanged Event | Geek_Guest | ASP.NET | 1 | 03-15-2007 03:04 AM |
| Insert Multiple Records at once | Radhi09 | SQL | 6 | 02-19-2007 06:11 AM |