Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need the saving command...

Posted on 2001-06-21
5
Medium Priority
?
153 Views
Last Modified: 2010-05-02
Hi,
  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 fields...so what I need to do and also what is the best way..thanks again a lot of expert there..thans..
0
Comment
Question by:leeboonseong
[X]
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
5 Comments
 
LVL 5

Expert Comment

by:rkot2000
ID: 6215112
what ?????????????????????????. need more info
0
 
LVL 1

Accepted Solution

by:
K7 earned 200 total points
ID: 6215319
Hi
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"
Con.Open

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

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

Cat
0
 
LVL 53

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.
0
 

Author Comment

by:leeboonseong
ID: 6222472
Just want to said thank you for ur help.bye bye. where r u form?
0
 
LVL 1

Expert Comment

by:K7
ID: 6222684
where am i from??
Melbourne Australia
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

636 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