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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. how will i create a program...?

how will i create a program...?

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 2 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.
  • W Offline
    W Offline
    whippersnapper76
    wrote on last edited by
    #1

    how will i create a program in visual basic 6.0 that reads all the tables and all the fieldnames of the table adikkaymonic

    N 1 Reply Last reply
    0
    • W whippersnapper76

      how will i create a program in visual basic 6.0 that reads all the tables and all the fieldnames of the table adikkaymonic

      N Offline
      N Offline
      noshaba mariam
      wrote on last edited by
      #2

      u need to create a connection object to access the database and a recordset object to access a table. then with the help of that recordset u can access the values of fields. ex: private sub form_load() dim cn as new adodb.connection dim rs as new adodb.recordset dim query as string cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mbdb;Data Source=abc" cn.Open query = "selet * from table1" rs.open query , cn if rs.eof = false then txtbox1.text = rs.fields("field1") end if rs.close set rs = nothing cn.close end sub try this hope it will help u Noshaba

      W 2 Replies Last reply
      0
      • N noshaba mariam

        u need to create a connection object to access the database and a recordset object to access a table. then with the help of that recordset u can access the values of fields. ex: private sub form_load() dim cn as new adodb.connection dim rs as new adodb.recordset dim query as string cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mbdb;Data Source=abc" cn.Open query = "selet * from table1" rs.open query , cn if rs.eof = false then txtbox1.text = rs.fields("field1") end if rs.close set rs = nothing cn.close end sub try this hope it will help u Noshaba

        W Offline
        W Offline
        whippersnapper76
        wrote on last edited by
        #3

        what im asking is that how can i copy all the tables and their fiels. not exactly the values of the fields. and put them on a txtfile or in a textbox. anyway thank you... youre the man..... adikkaymonic

        1 Reply Last reply
        0
        • N noshaba mariam

          u need to create a connection object to access the database and a recordset object to access a table. then with the help of that recordset u can access the values of fields. ex: private sub form_load() dim cn as new adodb.connection dim rs as new adodb.recordset dim query as string cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mbdb;Data Source=abc" cn.Open query = "selet * from table1" rs.open query , cn if rs.eof = false then txtbox1.text = rs.fields("field1") end if rs.close set rs = nothing cn.close end sub try this hope it will help u Noshaba

          W Offline
          W Offline
          whippersnapper76
          wrote on last edited by
          #4

          what im asking is that how can i copy all the tables and their fields. not exactly the values of the fields. and put them on a txtfile or in a textbox. anyway thank you... youre the man..... adikkaymonic

          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