Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / November 2008



Tip: Looking for answers? Try searching our database.

Setting adodb.field value, but not letting it update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yitzak - 18 Nov 2008 09:49 GMT
Hi

I have a recordset that can be updated I want to a change  field's
value in the recordset only.
So this field's value is not saved to the DB. I want the rest of the
fields to be saved to the DB

RS.open(....)
RS.Fields("helpid").value = 0
RS.Fields("age").value = 22
RS.Update

So age value set to 22 in DB, but helpid untouched in DB.

Is there any property that marks a field as unchanged?
Ralph - 18 Nov 2008 16:24 GMT
> Hi
>
[quoted text clipped - 11 lines]
>
> Is there any property that marks a field as unchanged?

Not really.

.Update causes ADO to create an Update query based on the original fetch
query. Thus if you asked for a Field - it will be included in the update.

The simplest way around this is to create your own Update query. The
advantage of using the .Update method is reduced code you have to write, but
just like any code-generation mechanism you are bound by its assumptions.

-ralph
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.