473,569 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fast computer problem?

I have access, for testing at my client's site, a Win2000 computer
running A2003 retail. He recently upgraded all of his other machines to
DualCore Pentiums with 2 gig ram and run A2003 runtime. I believe all
current SPs for Windows and Office are installed on the fast machines.

I have 1 process/subroutine that has worked for a couple of years
without a problem. It works fine on the testing (slow) machine. The
process checks a folder for any INI files there. After I process the
INI file I change the extension to RED then search for any other INI
files in the folder.

Twice in the last week a situation has occurred where it reads the INI
file, processes the data. It's then supposed to rename the file to RED
and then find the next INI file. If not found it exits the loop. But
in one case 1500+ duplicate records were created from 1 INI file instead
of 1 record as expected and yesterday 775+ duplicate records were
created. It's like it processed the INI file, did the rename, but found
the same INI file before it could be renamed and processed it again for
many times until it finally could do the renaming and then exited the loop.

In another process, used since 2005 without incident, we have a printer
that converted files to PDFs. When the routine is called I call a DLL
via CreateObject, call a couple of DLL commands, then swap the default
printer to the PDF converter, print the report, and reset the printer.

However, on the fast computers, the PDF file was not being created. It
looked like it was bypassing the entire process. I saw I was trapping
for a specific error number, removed the trap so all errors would
display, and it calling the DLL code generated errors. I fixed this
problem by using Stephen Leban's PDF converter, an excellent replacement
since it works without a problem.

I can run both processes all day long from the slow computer. But on
the fast computers the problems occur.

I remember when FoxPro required a patch when fast computers came out to
slow the computer down so it could complete command instructions.

Do you have any ideas as to why a fast computer might have a problem
where slow computers don't? Do you think I should find anyplace in my
code that has a "Filecopy" or "Name" (DOS rename), or any other DOS like
commands and insert a DoEvents after it?
Sep 27 '08 #1
9 2137
On Sat, 27 Sep 2008 12:26:41 -0700, Salad <oi*@vinegar.co mwrote:

DoEvents is not going to make it better.
Consider moving the files in a Processed subfolder. Another option is
to first read the filenames into an array (using the Dir function),
then process the array.

-Tom.
Microsoft Access MVP

>I have access, for testing at my client's site, a Win2000 computer
running A2003 retail. He recently upgraded all of his other machines to
DualCore Pentiums with 2 gig ram and run A2003 runtime. I believe all
current SPs for Windows and Office are installed on the fast machines.

I have 1 process/subroutine that has worked for a couple of years
without a problem. It works fine on the testing (slow) machine. The
process checks a folder for any INI files there. After I process the
INI file I change the extension to RED then search for any other INI
files in the folder.

Twice in the last week a situation has occurred where it reads the INI
file, processes the data. It's then supposed to rename the file to RED
and then find the next INI file. If not found it exits the loop. But
in one case 1500+ duplicate records were created from 1 INI file instead
of 1 record as expected and yesterday 775+ duplicate records were
created. It's like it processed the INI file, did the rename, but found
the same INI file before it could be renamed and processed it again for
many times until it finally could do the renaming and then exited the loop.

In another process, used since 2005 without incident, we have a printer
that converted files to PDFs. When the routine is called I call a DLL
via CreateObject, call a couple of DLL commands, then swap the default
printer to the PDF converter, print the report, and reset the printer.

However, on the fast computers, the PDF file was not being created. It
looked like it was bypassing the entire process. I saw I was trapping
for a specific error number, removed the trap so all errors would
display, and it calling the DLL code generated errors. I fixed this
problem by using Stephen Leban's PDF converter, an excellent replacement
since it works without a problem.

I can run both processes all day long from the slow computer. But on
the fast computers the problems occur.

I remember when FoxPro required a patch when fast computers came out to
slow the computer down so it could complete command instructions.

Do you have any ideas as to why a fast computer might have a problem
where slow computers don't? Do you think I should find anyplace in my
code that has a "Filecopy" or "Name" (DOS rename), or any other DOS like
commands and insert a DoEvents after it?
Sep 27 '08 #2
On Sat, 27 Sep 2008 12:26:41 -0700, Salad <oi*@vinegar.co mwrote:
And another thing: it seems you have a database design flaw if it is
possible to created unwanted duplicates. Apply a unique index.

-Tom.

<clip>
Sep 27 '08 #3
Tom van Stiphout wrote:
On Sat, 27 Sep 2008 12:26:41 -0700, Salad <oi*@vinegar.co mwrote:

DoEvents is not going to make it better.
OK.
Consider moving the files in a Processed subfolder. Another option is
to first read the filenames into an array (using the Dir function),
then process the array.
I'll think on this.

We may use an option my client found today at MS support for
A97...disable the dual cpu processing and slow the computer down to 1
CPU. Kind of stupid...buy a fast computer to make it slow but sometimes
one's gotta do what one's gotta do.
http://support.microsoft.com/kb/178650

>
-Tom.
Microsoft Access MVP
>>I have access, for testing at my client's site, a Win2000 computer
running A2003 retail. He recently upgraded all of his other machines to
DualCore Pentiums with 2 gig ram and run A2003 runtime. I believe all
current SPs for Windows and Office are installed on the fast machines.

I have 1 process/subroutine that has worked for a couple of years
without a problem. It works fine on the testing (slow) machine. The
process checks a folder for any INI files there. After I process the
INI file I change the extension to RED then search for any other INI
files in the folder.

Twice in the last week a situation has occurred where it reads the INI
file, processes the data. It's then supposed to rename the file to RED
and then find the next INI file. If not found it exits the loop. But
in one case 1500+ duplicate records were created from 1 INI file instead
of 1 record as expected and yesterday 775+ duplicate records were
created. It's like it processed the INI file, did the rename, but found
the same INI file before it could be renamed and processed it again for
many times until it finally could do the renaming and then exited the loop.

In another process, used since 2005 without incident, we have a printer
that converted files to PDFs. When the routine is called I call a DLL
via CreateObject, call a couple of DLL commands, then swap the default
printer to the PDF converter, print the report, and reset the printer.

However, on the fast computers, the PDF file was not being created. It
looked like it was bypassing the entire process. I saw I was trapping
for a specific error number, removed the trap so all errors would
display, and it calling the DLL code generated errors. I fixed this
problem by using Stephen Leban's PDF converter, an excellent replacement
since it works without a problem.

I can run both processes all day long from the slow computer. But on
the fast computers the problems occur.

I remember when FoxPro required a patch when fast computers came out to
slow the computer down so it could complete command instructions.

Do you have any ideas as to why a fast computer might have a problem
where slow computers don't? Do you think I should find anyplace in my
code that has a "Filecopy" or "Name" (DOS rename), or any other DOS like
commands and insert a DoEvents after it?
Sep 28 '08 #4
Tom van Stiphout wrote:
On Sat, 27 Sep 2008 12:26:41 -0700, Salad <oi*@vinegar.co mwrote:
And another thing: it seems you have a database design flaw if it is
possible to created unwanted duplicates. Apply a unique index.
Maybe. I'll see if I can index hyperlinks. Or at least see if I can
findfirst a hyperlink.

It seems weird to consider modifying a database table, perhaps splitting
a hyperlink into it's parts and store in separate fields for something
that's been working for years on slower computers.
>
-Tom.

<clip>
Sep 28 '08 #5
Tom van Stiphout <to************ *@cox.netwrote:
>DoEvents is not going to make it better.
It just might. "Yields execution so that the operating system can process other
events."

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Sep 30 '08 #6
On Sep 29, 11:43*pm, "Tony Toews [MVP]" <tto...@teluspl anet.net>
wrote:
Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
DoEvents is not going to make it better.

It just might. *"Yields execution so that the operating system can process other
events."

Tony
--
Tony Toews, Microsoft Access MVP
* *Please respond only in the newsgroups so that others can
read the entire thread of messages.
* *Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab. ca/accsmstr.htm
* *Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
It seems like doevents wouldn't do anything here because what Salad is
doing (renaming files) wouldn't raise any 'events' to be processed. I
think the safest thing would be to do what Tom describes, i.e. load
the file names into an array or collection first and use a for...loop
on that rather than a do...loop with a dir() in the middle of it
especially if the dir() process and the renaming process are somehow
happening asynchronously.

Bruce
Sep 30 '08 #7
Salad <oi*@vinegar.co mwrote in
news:J5******** *************** *******@earthli nk.com:
It seems weird to consider modifying a database table, perhaps splitting
a hyperlink into it's parts and store in separate fields for something
that's been working for years on slower computers.
Probably it is. I suppose you could show us your code as an alternative.

I think I'd follow Tom's suggestion. But instead I might put in a loop that
waited until a DoesFileExist(T he Red File) function returns a true with
maybe a counter or timer in it (the loop, not the function) so that it
didn't run infinitely in case something screws up. Then I'd look for the
next ini file.
(Or maybe until DoesFileExist(T he Ini File) returns a false.)

Have you thought about changing your sequence to Read (to a string),
Rename, Process or even Rename, Read, Process?

How are you looking for the ini files? Dir$("*.ini") or Dir("*.ini") won't
return a file a second time with subsequent calls to Dir$() or Dir().

Just in Case:

Public Function DoesFileExist20 00(ByVal FilePath$) As Boolean
With WizHook
.Key = 51488399
DoesFileExist20 00 = .FileExists(Fil ePath)
End With
End Function

BTW, I thought ini files went out with the last ice age? The Registry is
very easy to write to and to read.

Disable one of the dual cores? Surely NOT?! Better to write everything in
long hand on recipe cards ...

--
lyle fairfield
Oct 1 '08 #8
lyle fairfield wrote:
Salad <oi*@vinegar.co mwrote in
news:J5******** *************** *******@earthli nk.com:

>>It seems weird to consider modifying a database table, perhaps splitting
a hyperlink into it's parts and store in separate fields for something
that's been working for years on slower computers.


Probably it is. I suppose you could show us your code as an alternative.
Here's my original code. I can look at this all day and not see
anything that would make this code fail.
....initialize/Dim variables here then
If strFolder <"" Then
strSearch = strFolder & "*.INI"
strFiles = Dir(strSearch)
Do While strFiles ""
strRename = Left(strFiles, Len(strFiles) - 3) & "red"

'see if it originated inhouse. If so, delete the file
'and return false. If external source, return true.
blnAppend = AppendIt(strFol der & strFiles)

If blnAppend Then

'process the ini file and append a rec into table. If
'a rec is added, return true. If there's an error, return false
AppendINIData strFolder & strFiles

'blnRename is a global variable. The value is set each time
'a file is processed in AppendIniData. It defaults to true. If 'an
error occurs, it's set to false.
If blnRename Then
Name strFolder & strFiles As strFolder & strRename
Else
Exit Do
End If

End If
strFiles = Dir(strSearch)
Loop
ReadIni = True
End If
>
I think I'd follow Tom's suggestion. But instead I might put in a loop that
waited until a DoesFileExist(T he Red File) function returns a true with
maybe a counter or timer in it (the loop, not the function) so that it
didn't run infinitely in case something screws up. Then I'd look for the
next ini file.
(Or maybe until DoesFileExist(T he Ini File) returns a false.)

Have you thought about changing your sequence to Read (to a string),
Rename, Process or even Rename, Read, Process?
If there's an error I'd like to know about it and keep the file as it
is. If it can't be processed correctly it would inform the user of the
error and file name.
>
How are you looking for the ini files? Dir$("*.ini") or Dir("*.ini") won't
return a file a second time with subsequent calls to Dir$() or Dir().
As you can see above, I don't use Dir() by itself
Just in Case:

Public Function DoesFileExist20 00(ByVal FilePath$) As Boolean
With WizHook
.Key = 51488399
DoesFileExist20 00 = .FileExists(Fil ePath)
End With
End Function

BTW, I thought ini files went out with the last ice age? The Registry is
very easy to write to and to read.
The files are created from an external program. Works fine for me tho,
each row a "field name" with it's value.
Disable one of the dual cores? Surely NOT?! Better to write everything in
long hand on recipe cards ...
I hate the concept of doing so. I modified my code. Before I call the
Appendit() function I now check to see if the hyperlink filename value
(contained in the INI file) already exists in the table. I do this by
splitting the hyperlink address from the text in the table. If it does
exist, I attempt to rename the INI file. If it doesn't exist, it's a
new record and I process it. Then I add the INI filename to a variable
containing the list of files that I've processed in this loop. I then
do a dir(folder *INI) again and search for the next ini. If one exists,
check if its in the list of processed files. If it exists exit the loop
otherwise start the process step again. I'm hoping these added steps
will stop the problem.
Oct 1 '08 #9
Salad <oi*@vinegar.co mwrote in
news:Hp******** *************** *******@earthli nk.com:
Here's my original code. I can look at this all day and not see
anything that would make this code fail.
...initialize/Dim variables here then
If strFolder <"" Then
strSearch = strFolder & "*.INI"
strFiles = Dir(strSearch)
Do While strFiles ""
strRename = Left(strFiles, Len(strFiles) - 3) & "red"

'see if it originated inhouse. If so, delete the file
'and return false. If external source, return true.
blnAppend = AppendIt(strFol der & strFiles)

If blnAppend Then

'process the ini file and append a rec into table. If
'a rec is added, return true. If there's an error, return false
AppendINIData strFolder & strFiles

'blnRename is a global variable. The value is set each time
'a file is processed in AppendIniData. It defaults to true. If
'an
error occurs, it's set to false.
If blnRename Then
Name strFolder & strFiles As strFolder & strRename
Else
Exit Do
End If

End If
strFiles = Dir(strSearch)
Loop
ReadIni = True
End If
I suspect that the problem could be solved by changing the second
strFiles = Dir(strSearch)
to
strFiles = Dir()
(This is the standard way of using Dir and is related to Tom's point.)

and that the renaming in the loop could be replaced after the loop with
Name strSearch AS Replace(StrSear ch,".INI", ".red")
or maybe
Kill Replace(StrSear ch,".INI", ".red")
--
lyle fairfield
Oct 1 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4039
by: PedroX | last post by:
Hello: I need to parse some large XML files, and save the data in an Access DB. I was using MSXML 2 and ASP, but it turns out to be extremely slow when then XML documents are like 10 mb in size. It's taking over an hour to parse such sizes!? I don't really need to use ASP or a web server at all because I am parsing all in my own...
0
1621
by: SoftComplete Development | last post by:
AlphaTIX is a powerful, fast, scalable and easy to use Full Text Indexing and Retrieval library that will completely satisfy your application's indexing and retrieval needs. AlphaTIX indexing technology provides you with highest indexing performance, possibility to index very large sets of data in minimal time even with memory constraints and...
20
9124
by: GS | last post by:
The stdint.h header definition mentions five integer categories, 1) exact width, eg., int32_t 2) at least as wide as, eg., int_least32_t 3) as fast as possible but at least as wide as, eg., int_fast32_t 4) integer capable of holding a pointer, intptr_t 5) widest integer in the implementation, intmax_t Is there a valid motivation for...
19
2379
by: Dave | last post by:
I'm building a research application that needs to be a super speed demon. I decided that one way to do this is to use goto loops instead of while() loops when I need them. that way, instead of checking the variable inside the while() all it has to do is continue looping until another goto statement is used to change the direction of the...
5
2682
by: Vanga Sasidhar | last post by:
I am a new commer to this asp.net. I setup a small website using iis in my winxp computer. but everytime i open the page it is opening very slowely at the first time. but from the second try onwards, it is opening very fast. how can i make the page to be loaded very fast ever at the first time. thank you, Sasidhar
95
4986
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ____________________________________ | | | ------------------ ...
7
3566
by: eselk | last post by:
I'm doing some speed tests. I created a brand-new table, with just one "Long Integer" field. I'm testing adding 1000 records. If I use the "Export" feature in Access, it takes only a few seconds to export the 1000 records to a new table on the server. If I use my code below, it takes 100 secods (10 records per second). Can someone help...
14
2218
by: Karch | last post by:
I need to find the fastest way in terms of storage and searching to determine if a given string contains one of a member of a list of strings. So, think of it in terms of this: I have a string such as the following: "Smith said the dog belongs (or did belong) to the secretary, an employee of the company." Then the list contains the...
4
4346
by: setesting001 | last post by:
How many of you are running Fast CGI instead of the popular mod_php? I planning to change to fast cgi since my applications need around 15MB memory to handle a single request, so consider if Apache running in multi-process mode, serving 300 clients, then it nearly used up all my memory in my server. Any experience can share how to handle...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
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...
0
6281
agi2029
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...
1
5509
isladogs
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...
0
5218
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...
0
3653
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...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.