Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Once ive managed to establish a connection to an access database, how can i write a new record or modify an existing one and read records. Any help would be appreciated.
Thank you in advance.CJ

I have been having the same problem(except with a Orcale Database)
this is what I've figured out so far
To add records
RecordSet.Open(" your SQL Insert Statement")
to modify existing records I'm sure it would be simular as above just using a SQL Update statement(I havent gotten that far yet)hope that helps.

you need to create a call statement string and object the following is an example of the principles you must examine the api of the prgraming language for the call and result set object to be used. assuming you have a connectiuon to database.
string myname ="tom jones"
string yourname "not known"CallableStatement stmt = connection.prepareCall("update foo set fooname1 = "+myname+","+ fooname2 = "+yourname");
if you want to paramiterise the string then do
stmt "update foo set fooname1 = ?, fooname2 = ?";then get a connection for the stmt and call execute. Set the parameter on the stmt first eg.
stmt.setString(1,myname);
stmt.setString(2,yourname);then execute the query by calling what ever the api your using requires
stmt.executeQuery();
the principles are the same for most database connectivity. you need to examine the API of the programming language yourusing.
i know ado have result set and call objects available.
tod

![]() |
Oracle 9i
|
Ms vb c+
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |