Computing.Net > Forums > Programming > .NET ADO help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

.NET ADO help

Reply to Message Icon

Name: CJ
Date: October 2, 2002 at 17:14:58 Pacific
OS: Win 2k
CPU/Ram: 1.3G
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Yoshi
Date: October 3, 2002 at 17:34:31 Pacific
Reply:

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.



0

Response Number 2
Name: tod
Date: October 10, 2002 at 07:09:20 Pacific
Reply:

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



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Oracle 9i Ms vb c+



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: .NET ADO help

.NET help www.computing.net/answers/programming/net-help/3651.html

C# ASP.NET need help www.computing.net/answers/programming/c-aspnet-need-help/5854.html

.NET Winsock help www.computing.net/answers/programming/net-winsock-help/3592.html