Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Access & VB6...

I want use Access and VB6 to control databases (high losses changes and see the data) from scratch. (not is cliente/server program, is monouser)

what can I do?  any idea? pls write a skeletor source code or any web page to download code or any

Thanks for all.

regards

0
nowait
Asked:
nowait
1 Solution
 
TimCotteeCommented:
nowait, the simple answer to this is "just do it". But to be a little more helpful here is an outline that should at least get you started:

Run access and create a simple table,
Run VB and choose the Data Form Wizard (it is an add-in which you may need to enable from the Tools menu) this will automatically create a form with a grid/text boxes etc and buttons to allow you to add/edit/delete records from the table.

There you have it, at least in essence. From that you can then start to build in additional tables, using the sample code created by the wizard you can see the methods used to manipulate the data and can build further complexity into that until you have a complete application.

I could provide examples of this, but it is difficult to do so well without knowing what sort of application you are trying to produce. In my opinion it is better to go for it in this way and then ask more questions as you encounter problems, or as you find that you cannot get the application to work in the way that you intend.
0
 
setiawanCommented:
Hi nowait,

here is some examples using ADO

Dim objConn as New ADODB.Connection
Dim objRec as New ADODB.Recordset
Dim sql as string

ObjConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data\db1.mdb"

sql = "Select * from confirmed where Archived=" & No
ObjRec.Open sql, objConn,2 , 1

That's it

Now, you can do some operation with recordset object

objRec.MoveFirst ' goto first rec
objRec.MoveNext  ' goto next rec
objRec.MoveLast  ' goto last rec

if you want to dispaly the result in the list box, you can do like this :

objRec.MoveFirst
do while objRec.EOF
   list1.addItem objRec.Fields("RoomID")
loop

'dont forget to close the connection and recorset object when you finished

objRec.close
objConn.close
set objRec = Nothing
set objConn = Nothing

hope this helps :)

  danny

0
 
nowaitAuthor Commented:
Thanks setiawan & TimCotten
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now