Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update a record in the recordset


Dears,
I was so confused when reading documents about updating record in th
recordset using ADO. So please help me.
How can I change a record in the recordset and update it to the sourc
data.
Thanks so much for your help.
OverA

--
OverA
-----------------------------------------------------------------------
OverAC's Profile: http://www.excelforum.com/member.php...fo&userid=3239
View this thread: http://www.excelforum.com/showthread.php?threadid=52952

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Update a record in the recordset

If your recordset object is RS:
To update/change a value in the recordset:

RS.Fields("MYFIELD").VALUE = your Value ' ensure value is the same as the
underlying type

To update the source:

RS.Update

For this to work, 1. you need to have opened the recordset with the
'correct' cursor 2. the data source must support Update (or UpdataBatch);
some data sources (like Excel) do not support this functionality.

"OverAC" wrote:


Dears,
I was so confused when reading documents about updating record in the
recordset using ADO. So please help me.
How can I change a record in the recordset and update it to the source
data.
Thanks so much for your help.
OverAC


--
OverAC
------------------------------------------------------------------------
OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396
View this thread: http://www.excelforum.com/showthread...hreadid=529527


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Update a record in the recordset


AA2e72E Wrote:
2. the data source must support Update (or UpdataBatch);
some data sources (like Excel) do not support this functionality

Ôi.
My data source is an another Excel file, please help......

OverAC


--
OverAC
------------------------------------------------------------------------
OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396
View this thread: http://www.excelforum.com/showthread...hreadid=529527

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
record update VBA form Roy Gudgeon[_2_] Excel Discussion (Misc queries) 0 March 15th 10 04:27 PM
On Duplicate, update record MikeD1224 Excel Discussion (Misc queries) 1 April 2nd 09 10:19 PM
update record in mdb.. sal21[_90_] Excel Programming 1 December 9th 05 01:18 PM
Record update date in cell Patrick Molloy[_2_] Excel Programming 0 June 6th 05 01:43 PM
Code to Update a Record No Name Excel Programming 1 January 29th 04 10:02 PM


All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"