Results 1 to 4 of 4

Thread: How to insert textbox values in database using ADO

  1. #1
    Geek_Guest
    Guest

    How to insert textbox values in database using ADO

    How to insert textbox values in the database using ADO connections in VB

    Question asked by visitor Durga Prasad.Argi


  2. #2
    Junior Member
    Join Date
    May 2006
    Answers
    4

    Re: How to insert textbox values in database using ADO

    Could you please explain the question a bit?


  3. #3

    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


  4. #4
    Junior Member
    Join Date
    Jun 2007
    Answers
    2

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact