473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 2118
On Sat, 27 Sep 2008 12:26:41 -0700, Salad <oi*@vinegar.comwrote:

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.comwrote:
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.comwrote:

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.comwrote:
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...@telusplanet.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.comwrote in
news:J5******************************@earthlink.co m:
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(The 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(The 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 DoesFileExist2000(ByVal FilePath$) As Boolean
With WizHook
.Key = 51488399
DoesFileExist2000 = .FileExists(FilePath)
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.comwrote in
news:J5******************************@earthlink.co m:

>>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(strFolder & 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(The 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(The 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 DoesFileExist2000(ByVal FilePath$) As Boolean
With WizHook
.Key = 51488399
DoesFileExist2000 = .FileExists(FilePath)
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.comwrote in
news:Hp******************************@earthlink.co m:
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(strFolder & 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(StrSearch,".INI", ".red")
or maybe
Kill Replace(StrSearch,".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
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...
0
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...
20
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.,...
19
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...
5
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...
95
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
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...
14
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...
4
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.