Inconsistent problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem with an upload feature. When I tested it on my own
computer I had no problems. I ran many tests all sucessful. When I loaded
it on the clients computer I had two inconsistent problems. Also the speed
of the upload seemed to be about 10 times slower on the clients computer.

First, it stopped and went to a line of code but without any error message.
The code line was yellow but I was able to continue the code without any
changes. There is no stop request here, so I find this very weird. Running
the same data through the same code the next time was sucessful - no problem.

Two, a similar problem but instead of breaking to code I got a 'No Record'
error. But it didn't take me to debug the code. Again when the same file
was uploaded it was sucessful with no changes.

I do not know how to debug this/these problems since it only happens one out
of five times. And by that I mean I tried uploading the same exact file five
times without making any changes to the file or the code. If I step throught
the code I don't have any problem.

I am wondering if the problem might have something to do with the client set
up. They are peer-to-peer and the back end is on a mapped drive on one of
the computers. Is it possible that if the computer holding the data is busy
that code could timeout?

Thanks in advance.

Alison
 
One thing that can happen when you move a database from one computer to
another, the references that are set on your own computer may not be set on
the client's computer. This is a very common problem. To find out you need
to look at references when you are in the VB Code Editor window. The best
way to find out if there is an issue with any code is to issue a Compile of
all Modules when you are inside the VB Editor. Going from memory, I believe
it is under the Debug menu choice.
 
I bet that G. Vaught is right about the references problem being one of the
problems.

Peer-to-peer is much slower than doing it on a single computer or on a
properly set up network. Also how does your computer measure up to the
client's? I use to keep an old Pentium II machine hooked up to a 10MB network
card just to test databases at home before taking them to a client's
computer.
 
Thanks guys, I'll check references tomorrow.

Jerry Whittle said:
I bet that G. Vaught is right about the references problem being one of the
problems.

Peer-to-peer is much slower than doing it on a single computer or on a
properly set up network. Also how does your computer measure up to the
client's? I use to keep an old Pentium II machine hooked up to a 10MB network
card just to test databases at home before taking them to a client's
computer.
 
OK Now I am really at a loss and really need help.

The references are exactly the same on the clients machine as they are on my
home computer. I have also tried putting the Front End and Back End on the
C: drive of the clients computer and I am still getting intermittent sucess.

I have set up an upload status table that tells me where the file crashed.

1100 2/27/2006 9:08:48 AM Failed on order 620815 Item 41
1100 2/27/2006 9:12:48 AM Successful
1100 2/27/2006 9:36:19 AM Failed on order 620815 Item 40
1100 2/27/2006 9:37:12 AM Failed on order 620815 Item 3
1100 2/27/2006 9:37:55 AM Failed on order 620904 Item 7
1100 2/27/2006 9:38:43 AM Failed on order 620930 Item 1
1100 2/27/2006 9:39:40 AM Successful

As you can see the same order uploaded over and over produces different
results each time. Same order - same code - different results ??????

What is happening is an excel file contains many lines of data. Some are
header info, some are details for many orders. The codes counts the number
of orders in the excel file. Then one by one loads the header info into the
Access fields, then counts how many items are on that order, then cycles
through matching each item in the order with existing inventory and puts it
on the order in Access. Then moves to next order in the excel file.

I am abolutely perplexed. I could post the code but it is very large. I
would really appreciate any ideas. I'm desperate!

Thanks in advance.

Alison.
 
If the same Excel file uploads properly on your computer but not the
client's; you have the same references; and taking it off the network doesn't
change things, I'm suspecting that computer.

Does it have the same service packs and service releases for both Windows
and Office? The same version of Jet?

I'd also wonder if it has a bad memory module causing random problems.
Anything else buggy on that computer? Have you considered running the process
on a third computer and seeing if it works there? If so, you could have more
confidence that it's a PC problem.
 
Thanks Jerry, I have now eliminated the computers as a problem. I have been
able to repeat the problem on my home computer (just not as often).

While running in break code I have found that the looping, which seems to
work most of the time will occassionally fail. It was a For Next loop, but I
have changed it to a Do while loop.

The recordset contains two lines for each item.

Set rsDistinctDetails = db.OpenRecordset("select * from tbluploadorders
where f1 = " & rsOrderNums.Fields("f1") & " and (F3 = '3itmnum' or f3 =
'1QTYORD') order by f2, f3")

I am wondering if the order of f2, f3 is failing occasionally which would
result in the code picking up an item code when expecting a qty?

I have probably not been clear but any ideas are appreciated.

Thanks.
 
I have found the problem. It was a line of code out of order. I had
'movenext' before a 'loop' when it should have been after as there was an
internal loop which is to fill the ordered item should the first record be
insufficient.

Thanks so much for your help.
 
Back
Top