473,397 Members | 1,969 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,397 software developers and data experts.

A2K tables and VB: delay to update and/or refresh ?

Hi All,

I am getting crazy....
This code work fine in step by step but at execution time, it looks like a
delay to refresh the A2K table from VB is resulting in some records being
treated more than once.

What is wrong ?
How can I "flush" data in the A2K tables?
Thanks for helping,
Bernard
Private Sub Timer3_Timer()
Timer3.Interval = 0
Dim erlop As Integer, nbrecs As Integer, x As Integer
erlop = 0
Comm1.OutBufferCount = 0
Comm1.InBufferCount = 0
Image1.Visible = Not Image1.Visible
If Comm1.PortOpen = True Then
If Not Data2.Recordset.EOF Then
Data2.Recordset.MoveFirst
nbrecs = Data2.Recordset.RecordCount
While Not Data2.Recordset.EOF
If Data2.Recordset("Sent") = False Then
okout = ""
Comm1.OutBufferCount = 0
Comm1.InBufferCount = 0
Comm1.Output = "at+cmgs=" & Chr(34) &
Data2.Recordset("tonum") & Chr(34) & vbCr & Data2.Recordset("texte") &
Chr(26)
While InStr(1, okout, "OK") = 0 And InStr(1, okout, "ERROR")
= 0
erlop = erlop + 1
okout = okout & Comm1.Input
dummy = DoEvents()
If erlop > 50 Then
erlop = 0
Comm1.OutBufferCount = 0
Timer3.Interval = 1000
Exit Sub
End If
Wend
If InStr(1, okout, "OK") <> 0 Then
Comm1.OutBufferCount = 0
Data2.Recordset.Edit
Data2.Recordset("Sent") = True
Data2.Recordset.Update
Data2.Recordset.Delete
wait (3)
Data2.Refresh
End If
If InStr(1, okout, "ERROR") <> 0 Then
Comm1.OutBufferCount = 0
End If
Else
Data2.Recordset.Delete
Data2.Refresh
End If
If Not Data2.Recordset.EOF Then
Data2.Recordset.MoveNext
End If
Wend
End If
End If
Timer3.Interval = 1000
End Sub
Jul 17 '05 #1
0 3333

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

Similar topics

13
by: Wolfgang Kaml | last post by:
Hello All, I have been researching newsgroups and knowledgebase all morning and not found a solution that would solve the problem I have. I am having an ASP or ASPX web page that implement a...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
1
by: Troy | last post by:
Hello- I have a need to allow a user to reload a page on a chosen interval (selected from a select box) or to chose not to reload the page at all (default). I would like to do this in...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
4
by: glenhong | last post by:
Hi I need some help here. I am running Access 2003. I have an Access DB linked (Front-end) to another Access DB (Back-end). I have a Form which has a third party grid on it. The grid is...
6
by: Lewis Veale | last post by:
I have an Access 2000 front-end pointing at a SQL Server backend, with around 80 linked tables and views. I frequently need to point the front-end at different versions of the back-end, and achieve...
1
by: Jason Shohet | last post by:
We have an app that queries 5 tables into a dataset. Now, lets say 1 of those tables is about to change due to user input on a webpage. Right now, we are manually updating the db with an update...
4
by: Sebastian Böck | last post by:
Hello all, i have a view defined as a simple select of a table. This table is inherited by a couple of others. All entries belong to the child-tables. I also have an unconditional update rule...
2
by: gnewsgroup | last post by:
In my web application, an authenticated user can edit a lot of personal information and then finally can click on Update/Save button to save the info. I did it using MultiView. When the Update...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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,...
0
jinu1996
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...
0
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...
0
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,...
0
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...

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.