Can someone help me figure out what is the best way to perform this
task?
I have to detect if there were any changes from one recordset to
another. My recordset consists of a key (guid), and then three
fields. There will probably only be three or four records in each
set, so i'm not going to be dealing with a ton of processing.
For Example:
oRS - recordsetname
oRS("EmpKey") - my guid for the record
oRS("Name") - name of the employee
oRS("Salary") - salary of the employee
oRS("Hours") - hours the employee worked this week
In a language like perl, i would create two hashes, and compare these
hashes by key - but i don't know how to do this in ASP. I only need
to know if they differ in some way - but I don't think just doing a
rowcount is going to suffice.
Thanks for any assistance. 7 3068 da************* ***@gmail.com wrote:
Can someone help me figure out what is the best way to perform this
task?
I have to detect if there were any changes from one recordset to
another. My recordset consists of a key (guid), and then three
fields. There will probably only be three or four records in each
set, so i'm not going to be dealing with a ton of processing.
For Example:
oRS - recordsetname
oRS("EmpKey") - my guid for the record
oRS("Name") - name of the employee
oRS("Salary") - salary of the employee
oRS("Hours") - hours the employee worked this week
In a language like perl, i would create two hashes, and compare these
hashes by key - but i don't know how to do this in ASP. I only need
to know if they differ in some way - but I don't think just doing a
rowcount is going to suffice.
Could you provide more details? it could be you are trying to duplicate
functionality that already exists. Is the data in the recordsets from
the same server/database/table?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup. da************* ***@gmail.com wrote:
Can someone help me figure out what is the best way to perform this
task?
I have to detect if there were any changes from one recordset to
another. My recordset consists of a key (guid), and then three
fields. There will probably only be three or four records in each
set, so i'm not going to be dealing with a ton of processing.
For Example:
oRS - recordsetname
oRS("EmpKey") - my guid for the record
oRS("Name") - name of the employee
oRS("Salary") - salary of the employee
oRS("Hours") - hours the employee worked this week
In a language like perl, i would create two hashes, and compare these
hashes by key - but i don't know how to do this in ASP. I only need
to know if they differ in some way - but I don't think just doing a
rowcount is going to suffice.
Oh! And what types of changes are you trying to detect? Added/Deleted
records? Modified data in any of the fields?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
On Mar 22, 9:54 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
danielle.m.mann ...@gmail.com wrote:
Can someone help me figure out what is the best way to perform this
task?
I have to detect if there were any changes from one recordset to
another. My recordset consists of a key (guid), and then three
fields. There will probably only be three or four records in each
set, so i'm not going to be dealing with a ton of processing.
For Example:
oRS - recordsetname
oRS("EmpKey") - my guid for the record
oRS("Name") - name of the employee
oRS("Salary") - salary of the employee
oRS("Hours") - hours the employee worked this week
In a language like perl, i would create two hashes, and compare these
hashes by key - but i don't know how to do this in ASP. I only need
to know if they differ in some way - but I don't think just doing a
rowcount is going to suffice.
Oh! And what types of changes are you trying to detect? Added/Deleted
records? Modified data in any of the fields?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.- Hide quoted text -
- Show quoted text -
Thanks for your assistance -
I am trying to detect any changes - an addition, a deletion, or a
modification in the fields. As far as the data being in the database
- it's not. The functionality as it exists is that for a given key, a
"kill and fill" is done with the records in the database. What I have
done is before the "kill" - put the existing records in a recordset.
Then the kill and fill is performed. But I want to compare the
records as they were in the database before the kill with the new
records in the "fill" to see if a "change record" needs to be
written.
I'm trying to not change too much of the existing functionality in
order to accomplish the determination of a change -
Thanks again. da************* ***@gmail.com wrote:
On Mar 22, 9:54 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>danielle.m.man n...@gmail.com wrote:
>>Can someone help me figure out what is the best way to perform this task?
>>I have to detect if there were any changes from one recordset to another. My recordset consists of a key (guid), and then three fields. There will probably only be three or four records in each set, so i'm not going to be dealing with a ton of processing.
>>For Example: oRS - recordsetname oRS("EmpKey ") - my guid for the record oRS("Name") - name of the employee oRS("Salary ") - salary of the employee oRS("Hours" ) - hours the employee worked this week
>>In a language like perl, i would create two hashes, and compare these hashes by key - but i don't know how to do this in ASP. I only need to know if they differ in some way - but I don't think just doing a rowcount is going to suffice.
Oh! And what types of changes are you trying to detect? Added/Deleted records? Modified data in any of the fields?
Thanks for your assistance -
I am trying to detect any changes - an addition, a deletion, or a
modification in the fields. As far as the data being in the database
- it's not. The functionality as it exists is that for a given key, a
"kill and fill" is done with the records in the database. What I have
done is before the "kill" - put the existing records in a recordset.
Then the kill and fill is performed. But I want to compare the
records as they were in the database before the kill with the new
records in the "fill" to see if a "change record" needs to be
written.
And what if the data in the database changes while you are doing this
comparison?
I really don't like this approach. Too much reliance on cursors and not
enough on transaction processing. What database are you using? If SQL
Server, then you should definitely be using a trigger to generate your
"change record".
>
I'm trying to not change too much of the existing functionality in
order to accomplish the determination of a change -
Thanks again.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
On Mar 22, 10:43 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
danielle.m.mann ...@gmail.com wrote:
On Mar 22, 9:54 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
danielle.m.mann ...@gmail.com wrote: Can someone help me figure out what is the best way to perform this task?
>I have to detect if there were any changes from one recordset to another. My recordset consists of a key (guid), and then three fields. There will probably only be three or four records in each set, so i'm not going to be dealing with a ton of processing.
>For Example: oRS - recordsetname oRS("EmpKey" ) - my guid for the record oRS("Name") - name of the employee oRS("Salary" ) - salary of the employee oRS("Hours") - hours the employee worked this week
>In a language like perl, i would create two hashes, and compare these hashes by key - but i don't know how to do this in ASP. I only need to know if they differ in some way - but I don't think just doing a rowcount is going to suffice.
Oh! And what types of changes are you trying to detect? Added/Deleted
records? Modified data in any of the fields?
Thanks for your assistance -
I am trying to detect any changes - an addition, a deletion, or a
modification in the fields. As far as the data being in the database
- it's not. The functionality as it exists is that for a given key, a
"kill and fill" is done with the records in the database. What I have
done is before the "kill" - put the existing records in a recordset.
Then the kill and fill is performed. But I want to compare the
records as they were in the database before the kill with the new
records in the "fill" to see if a "change record" needs to be
written.
And what if the data in the database changes while you are doing this
comparison?
I really don't like this approach. Too much reliance on cursors and not
enough on transaction processing. What database are you using? If SQL
Server, then you should definitely be using a trigger to generate your
"change record".
I'm trying to not change too much of the existing functionality in
order to accomplish the determination of a change -
Thanks again.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.- Hide quoted text -
- Show quoted text -
I don't like the approach either - but I am guaranteed that the data
won't change in the database because it is on a per user basis - so,
unless two people are logged in as the same user -there can't be any
changes underneath.
This is SQL Server. Triggers (for this business) are not desireable
due to their maintainability .
I think i am being too unclear - I am really just looking for syntax
for a looping mechanism. For example -
if I have
key 1
key 2
key 3
in the first set and
key 1
key 2
key 3
in the second set - how can i compare the datas key / value pairs?
As I mentioned - this is something I would do using a foreach & a hash
in perl . I am just not familiar enough with Classic ASPs constructs
to know what is the proper mechanism.
hard to do this with ASP. I suggest posting in an SQL server forum. I think you'll find solutions for this type of problem using
some sort of stored procedure...
microsoft.publi c.sqlserver.pro gramming
<da************ ****@gmail.comw rote in message news:11******** **************@ y66g2000hsf.goo glegroups.com.. .
Can someone help me figure out what is the best way to perform this
task?
I have to detect if there were any changes from one recordset to
another. My recordset consists of a key (guid), and then three
fields. There will probably only be three or four records in each
set, so i'm not going to be dealing with a ton of processing.
For Example:
oRS - recordsetname
oRS("EmpKey") - my guid for the record
oRS("Name") - name of the employee
oRS("Salary") - salary of the employee
oRS("Hours") - hours the employee worked this week
In a language like perl, i would create two hashes, and compare these
hashes by key - but i don't know how to do this in ASP. I only need
to know if they differ in some way - but I don't think just doing a
rowcount is going to suffice.
Thanks for any assistance.
<da************ ****@gmail.comw rote in message
news:11******** **************@ p15g2000hsd.goo glegroups.com.. .
On Mar 22, 10:43 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>danielle.m.man n...@gmail.com wrote:
On Mar 22, 9:54 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote: danielle.m.man n...@gmail.com wrote: Can someone help me figure out what is the best way to perform this task?
>>I have to detect if there were any changes from one recordset to another. My recordset consists of a key (guid), and then three fields. There will probably only be three or four records in each set, so i'm not going to be dealing with a ton of processing.
>>For Example: oRS - recordsetname oRS("EmpKey ") - my guid for the record oRS("Name") - name of the employee oRS("Salary ") - salary of the employee oRS("Hours" ) - hours the employee worked this week
>>In a language like perl, i would create two hashes, and compare these hashes by key - but i don't know how to do this in ASP. I only need to know if they differ in some way - but I don't think just doing a rowcount is going to suffice.
>Oh! And what types of changes are you trying to detect? Added/Deleted records? Modified data in any of the fields?
Thanks for your assistance -
I am trying to detect any changes - an addition, a deletion, or a
modification in the fields. As far as the data being in the database
- it's not. The functionality as it exists is that for a given key, a
"kill and fill" is done with the records in the database. What I have
done is before the "kill" - put the existing records in a recordset.
Then the kill and fill is performed. But I want to compare the
records as they were in the database before the kill with the new
records in the "fill" to see if a "change record" needs to be
written.
And what if the data in the database changes while you are doing this comparison? I really don't like this approach. Too much reliance on cursors and not enough on transaction processing. What database are you using? If SQL Server, then you should definitely be using a trigger to generate your "change record".
I'm trying to not change too much of the existing functionality in
order to accomplish the determination of a change -
Thanks again.
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.- Hide quoted text -
- Show quoted text -
I don't like the approach either - but I am guaranteed that the data
won't change in the database because it is on a per user basis - so,
unless two people are logged in as the same user -there can't be any
changes underneath.
This is SQL Server. Triggers (for this business) are not desireable
due to their maintainability .
I think i am being too unclear - I am really just looking for syntax
for a looping mechanism. For example -
if I have
key 1
key 2
key 3
in the first set and
key 1
key 2
key 3
in the second set - how can i compare the datas key / value pairs?
As I mentioned - this is something I would do using a foreach & a hash
in perl . I am just not familiar enough with Classic ASPs constructs
to know what is the proper mechanism. http://www.w3schools.com/vbscript/vbscript_looping.asp
--
Mike Brind This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve Jorgensen |
last post by:
I keep having problems in which ADO disconnected recordset work under some
circumstances, but lose all their data at other times, having no rows or
fields, though the recordset object still exists.
One case where this happened to me today was in trying to store disconnected
recordsets in a cache collection in case they are needed again later in the
same session. When I retrieve the recordset from the collection, it's empty.
On the other...
|
by: Pieter Linden |
last post by:
The answer to this one is probably "test it yourself and find out!",
but I'll ask anyway. Pursuant to my previous question - sending
separate recordsets to Word using the CreateTableFromRecordset code
from ADH2000...
I will be opening like 8 recordsets {one for each building, and there
are 8). Would I be better off or is there anything to be gained by
opening one recordset of the query with _all_ the records in it,
filtering that, and...
|
by: lakshmi |
last post by:
Hi all,
I recently rewrote a data intensive C++ program in C#.
The C++ program was traversing 3 recordsets that were all
open at the same time. I replaced those 3 recordsets with
3 .NET data readers and found that my C# code takes only
about 35% of the time that the old C++ program took to
execute. I'm amazed at this performance improvement, but
finding it hard to believe. I'm supposed to make a
recommendation based on my test results.
|
by: Randy Harris |
last post by:
I was inspired by the recent discussion of returning multiple recordsets to
ADO from a stored procedure. (Amazed is probably more accurate). I asked
about how to accomplish same with Oracle and got a nudge in the right
direction from Mr. Kreft. I promised to provide details once working, so
here it is.
The code is shown below. My next step is to build this technique into my
application. I'm hoping for substantial performance gain.
...
|
by: Donald Grove |
last post by:
I want to populate an array with values from an ado recordset
(multiple rows)
I use the absolute position of the cursor in the recordset to define
the row of my array to be populated. I have a workaround for lack of
a way to define the ordinal position of a field (incrementing a
counter variable), but it feels so primitive:
dim Fld as Field
dim rst1 as new adodb.recordset
| |
by: mrmagoo |
last post by:
I'm building a vb.net Forms project that is getting data from a SQL Server
database.
One of the main goals of the project is to be really responsive to events,
such as textbox change events. I have a textbox for searching, a listbox to
display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.
My question is: should I load the controls with objects, and therefore store
everything in...
|
by: rdemyan via AccessMonster.com |
last post by:
Can someone help me with creating code that will look for DAO recordsets in
modules and then check to see if the recordset is also closed in the module.
All of my recordsets are of the form rs* where * is a wildcard for letters
after rs.
Thanks.
--
Message posted via AccessMonster.com
|
by: JasonP |
last post by:
I am using Access 2003 on Windows XP. I am looking to analyse web traffic files using this - I appreciate there are bespoke applications which will do the same task. Each month there are roughly 500,000 records. What I want to do is compare successive records, to calculate new fields at a visitor and visit level. Such as page number this visit, page number all visits by this visitor, time spent on current page, etc.
My table (shown below)...
|
by: gillianbrooks91 |
last post by:
Forgive me for asking this question, I've trawled through nearly every
available post on this subject that I can find for a few weeks now but
nothing quite points me in the right direction.
I'm quite new to trying to mess around with VB and ADO within MS
Access and have realised the steep learning curve I have, but, I want
to try and solve this problem quickly and was wondering if anyone
would help me out??
I want to be able to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |