I need the saving command...

Posted on 2001-06-21
Last Modified: 2010-05-02
  see u all again...this time is the problem that doing the saving...i already done my program ,now I have to save it to the database. which is separate to a lot of what I need to do and also what is the best way..thanks again a lot of expert there..thans..
Question by:leeboonseong
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6215112
what ?????????????????????????. need more info

Accepted Solution

K7 earned 50 total points
ID: 6215319
To trite to a DB i would use ADO, for the folowing code to work you have to add Microsoft ActiveX Data Object. you need version 2.6 to ba able to use Access 2000. Also the conection string in the code id for a access 2000 DB located in the same directory as the program.

Dim Con As New ADODB.Connection
Dim RS As New ADODB.Recordset

Con.Mode = adModeReadWrite
Con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\NameOfDB.mdb;Persist Security Info=False"

RS.Open "NameOfTable", Con, adOpenKeyset, , adCmdTable
RS("FieldName1") = "Value to save1"
RS("FieldName2") = "Value to save2"
RS("FieldName3") = "Value to save3"

this is probably one of the better ways of saving the data to a DB but there are may more and partly simpler ways

hope this was helpfull

LVL 52

Expert Comment

by:Ryan Chong
ID: 6216629
Hi Lee, just comment that Before you do your data entries, besure your database is already normalized, reduce those duplication and redundancy.

Use ADODB.Connection as it's the faster way to save data if compared with ADODC Data Control.

Author Comment

ID: 6222472
Just want to said thank you for ur help.bye bye. where r u form?

Expert Comment

ID: 6222684
where am i from??
Melbourne Australia

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 connector to SQL Server 2 42
Copy a row 12 75
Passing a Text Box name to a Sub 6 104
Export Data to Different .csv Files 27 131
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question