Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. vb.net, textbox connected with database

vb.net, textbox connected with database

Scheduled Pinned Locked Moved Visual Basic
helpcsharpdatabasequestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1494629
    wrote on last edited by
    #1

    Hi, I have several textboxes connected to an MS access database (not with code but wizards). I also have a tab control. The problem is: when I clear the textboxes with textbox1.text = "" or .clear method it clears it (or so it seems), but when I click on a different tab and back it reappears like it haven't been cleared I also tried clearing dataset, not working. I have tried almost everything, and nothing seems to fix this problem. Any suggestions?:confused: Thank You

    J 1 Reply Last reply
    0
    • U User 1494629

      Hi, I have several textboxes connected to an MS access database (not with code but wizards). I also have a tab control. The problem is: when I clear the textboxes with textbox1.text = "" or .clear method it clears it (or so it seems), but when I click on a different tab and back it reappears like it haven't been cleared I also tried clearing dataset, not working. I have tried almost everything, and nothing seems to fix this problem. Any suggestions?:confused: Thank You

      J Offline
      J Offline
      jlawren7
      wrote on last edited by
      #2

      So your textboxes are bound to a table. Are yo trying to add a new record ? is this why your clearing the textboxes? BTW if you clear text boxes ty not to use the "" use this ex. textbox1.text =vbnullstring vbnullstring is a faster and mre efficient way of clearing a TEXTbox or checking the contents of a text box post some code so we know what your trying to do... Help is great only if yu ask correctly

      A U 2 Replies Last reply
      0
      • J jlawren7

        So your textboxes are bound to a table. Are yo trying to add a new record ? is this why your clearing the textboxes? BTW if you clear text boxes ty not to use the "" use this ex. textbox1.text =vbnullstring vbnullstring is a faster and mre efficient way of clearing a TEXTbox or checking the contents of a text box post some code so we know what your trying to do... Help is great only if yu ask correctly

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        thanks for an excellent method, works great, although the problem was in dataset. it was kind of weird, what happened was a database connection seemed to be in a stage between being fully opened and fully closed so dataset.clear was giving me an (connection not opened) error but textbox.clear woudln't clear the text (which was bound to the dataset)

        1 Reply Last reply
        0
        • J jlawren7

          So your textboxes are bound to a table. Are yo trying to add a new record ? is this why your clearing the textboxes? BTW if you clear text boxes ty not to use the "" use this ex. textbox1.text =vbnullstring vbnullstring is a faster and mre efficient way of clearing a TEXTbox or checking the contents of a text box post some code so we know what your trying to do... Help is great only if yu ask correctly

          U Offline
          U Offline
          User 1494629
          wrote on last edited by
          #4

          sorry.. forgot to sign in

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups