Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query....Ignored???

Status
Not open for further replies.

cstrong

MIS
Dec 18, 2000
22
GB
Hello all,

I have a problem within my code, and as yet, cannot see any possible bugs within the sections of code in question.

Here's the setup to give you an idea as to what I am doing.

Pick Tickets are printed and sent down to the warehouse. The warehouse staff have RF Scanners, so they scan the barcode on the Pick Ticket which in turn tells them which parts to pick and how many. When they have picked a line, it runs an update query to a SQL Server table. Basically this writes back how many were picked and also writes a flag to say the line was scanned. Also, as each item is read into the RF scanner, another flag is written so that it cannot be read into another scanner (for multi picking purposes). OK...thats the background...

Every now and again, the update query to write the picked line back to SQL Server, does not execute. Also I found this on another area. It seems to be intermitent.

Here is an example of the code...

'Command Object definition
Set AdoCommand = New ADODB.Command
Set AdoCommand.ActiveConnection = AdoConn
AdoCommand.Properties.Item("Command Time Out").Value = 0

'Update Query
SQL = "UPDATE QCPick " _
& "SET RF_Read = 0, JDEUpd = 15 " _
& "WHERE SDPSN = '" & sPickSlip & "' AND LineScanned = 0"
AdoCommand.CommandText = SQL
AdoCommand.Execute

This query will always update between 1 and 3 rows. It can never not run.

This works pretty much every single time, but now and again it does not work....It's definately executing this code, I know that much...

Sorry for the long winded topic, but I'm trying to get all the facts accross! Aside from a bug, I am thinking about RF issues causing possible timeouts or glitches. I have contacted the RF vendors for suggestions but was wondering if any of you had experienced an Update clause seemingly ignored...!

Any idea's??

A very confused...
Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top