Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - ADO General
Forum to discuss ADO specific questions for use with SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ADO General | New ThreadView:  Search:  
 Author  Thread: Comparing changes between table and grdMygrid.recordset
David Nunnally
Posts: 206
 
Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 10:00 AM
fiogf49gjkf0d
Does any have an efficient way to compare what is different between two recordsets? I need to determine what is different between a grid recordset before storing that and the data already stored that it will be overwriting. The only way I know is a little slow. Step thru each record in grdMygrid.recordset and compare to the recordset pulled from the table and then step thru each of the table records and compare to the grdMygrid.recordset so I can get a list of the IDs of all items that were added and deleted to grdMygrid.recordset.
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 12:06 PM
fiogf49gjkf0d
You can use the ADO properties to determine if a row was modified, deleted, or inserted. Try using Recordset.Status

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprostatus.asp?frame=true

Hopefully this will help!

Timmus
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 12:25 PM
fiogf49gjkf0d
Good try. I am saving this one to use elsewhere but it does not work for this scenario - bummer!
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 12:35 PM
fiogf49gjkf0d
Bummer. Why wont it work? Please elaborate on what you need. Hopefully we can help.

Timmus
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 12:51 PM
fiogf49gjkf0d
The changes are saved by two different routines. One does some checking and updates the records that existed but may have changed along with some other stuff. Another routine adds and deletes records and then does some other stuff. Since this is split apart I have no easy way to check the status from both routines and then combine their output to one set of tableids to send to another sub to handle the next part. I know this sounds strange but you know how it is when someone wants something to work a specific way and they don't want to be told it can't be done! So I am trying to make an apple smell like a lemon and taste like an orange and look like a pear for them. If I could use one sub to write the recordset back to the table then .Status would have been perfect! But the other customizations force me to split the updates and add/deletes.
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 1:24 PM
fiogf49gjkf0d
Yuck. Sounds like fun .

Sorry I couldnt help you simplify.

Timmus
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Comparing changes between table and grdMygrid.recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Sep 06 1:29 PM
fiogf49gjkf0d
Don't be sorry. You did help me. I never knew about .Status and I can already think of several places I could use that!

Glad it sounds fun to someone! But I am pulling out my grey hairs!

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 4:35:56 PM