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

Big table looses Data - Access loss of Confidence

Hello, I am Helmut,

my database for multiuser is Frontend/Backend. The turnover file
is browsed by VBA for Article numbers to be found in the article table.
I use DAO 3.6 lib. The sql Statement uses the article number of the
turnover file - with 29 Fields. After record 187 or so, the Article
number, read from the turnover file

shows only a string of ten blanks.

Looking into the Turnover database shows clearly Article numbers.

They com from a AS400. OK. Some of the article numbers come with
appended blanks like "T005005005 ". Which makes me cautious.

Not so the missing article number of the turnaround table.

And all the following Art numbers (in the turnover table) are about ten
blanks. The Backend database which contains turnover and article is
repaired and compressed. Not so the frontend. I don't like to loose the
passwords and keywords. I use Access2000, in a multiuser citrix
environment, english version.

'---------cut here---
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase("D:\CustomersDB\DATA14.MDB")
Set UST = db.OpenRecordset("Umsätze", dbOpenTable) 'turnover
Set ART = db.OpenRecordset("Article", dbOpenTable)
UST.MoveLast
ustAnzrecs = UST.RecordCount
UST.MoveFirst
For ustRecCount = 1 To ustAnzrecs
If Left$(UST.Fields(16), 1) <> " " Then
If UST.Updatable Then
UMSART = UST!ART ' get Articlenumber from turnaround
Descr = UST!descrizione ' and description
' Data type mismatch Solution:eg.: "[WorkOrderID] = " & Chr(34) &
Worder & Chr(34) & ";"
SQLSelect = "SELECT ARTICLE.ART FROM ARTICLE in
'D:\Customersdb\Data14.mdb' " & _
"WHERE ARTicle.ART = " & Chr(34) & UMSART & Chr(34) & " "
Set ART = db.OpenRecordset(SQLSelect,dbOpenForwardOnly)
If Not ART.EOF Then 'found
ARTART = ART!ART 'get Articlenumber Just a Dummy
Else
If ART.Updatable Then '*** not found/new Record
End If
ART.AddNew
ART!ART = UMSART
ART!descrizione = Descr
ART.Update
'Wend
End If
UST.MoveNext
End If
End If
Next ' For read Loop Umsätze / Turnover

ART.Close
Set ART = Nothing
UST.Close
Set UST = Nothing
--- cut here---

2nd difficulty:
And my users report missing data in subforms of contact persons
in my address file subtable contact persons.
Inter National Help ... is appreciated.

Helmut

Nov 13 '05 #1
9 1588
I presume you regularly run a repair and compact operation on your database.

On 20 May 2005 18:01:31 -0700, "HelmutMunich" <he**************@12move.de>
wrote:
Hello, I am Helmut,

my database for multiuser is Frontend/Backend. The turnover file
is browsed by VBA for Article numbers to be found in the article table.
I use DAO 3.6 lib. The sql Statement uses the article number of the
turnover file - with 29 Fields. After record 187 or so, the Article
number, read from the turnover file

shows only a string of ten blanks.

Looking into the Turnover database shows clearly Article numbers.

They com from a AS400. OK. Some of the article numbers come with
appended blanks like "T005005005 ". Which makes me cautious.

Not so the missing article number of the turnaround table.

And all the following Art numbers (in the turnover table) are about ten
blanks. The Backend database which contains turnover and article is
repaired and compressed. Not so the frontend. I don't like to loose the
passwords and keywords. I use Access2000, in a multiuser citrix
environment, english version.

'---------cut here---
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase("D:\CustomersDB\DATA14.MDB")
Set UST = db.OpenRecordset("Umsätze", dbOpenTable) 'turnover
Set ART = db.OpenRecordset("Article", dbOpenTable)
UST.MoveLast
ustAnzrecs = UST.RecordCount
UST.MoveFirst
For ustRecCount = 1 To ustAnzrecs
If Left$(UST.Fields(16), 1) <> " " Then
If UST.Updatable Then
UMSART = UST!ART ' get Articlenumber from turnaround
Descr = UST!descrizione ' and description
' Data type mismatch Solution:eg.: "[WorkOrderID] = " & Chr(34) &
Worder & Chr(34) & ";"
SQLSelect = "SELECT ARTICLE.ART FROM ARTICLE in
'D:\Customersdb\Data14.mdb' " & _
"WHERE ARTicle.ART = " & Chr(34) & UMSART & Chr(34) & " "
Set ART = db.OpenRecordset(SQLSelect,dbOpenForwardOnly)
If Not ART.EOF Then 'found
ARTART = ART!ART 'get Articlenumber Just a Dummy
Else
If ART.Updatable Then '*** not found/new Record
End If
ART.AddNew
ART!ART = UMSART
ART!descrizione = Descr
ART.Update
'Wend
End If
UST.MoveNext
End If
End If
Next ' For read Loop Umsätze / Turnover

ART.Close
Set ART = Nothing
UST.Close
Set UST = Nothing
--- cut here---

2nd difficulty:
And my users report missing data in subforms of contact persons
in my address file subtable contact persons.
Inter National Help ... is appreciated.

Helmut


Nov 13 '05 #2

HelmutMunich wrote:
Hello, I am Helmut,

my database for multiuser is Frontend/Backend. ...


Hello, I am Lyle:

The code you have posted is inadequate, convoluted, redundant and
generally poor. It is inappropriate for you to attribute "Access loss
of confidence" to its failure to do what you want.

IMO, if you were to post the pertinent parts of the design of your two
tables, and a clear description of what you want to do, it's likely
that some JET SQL guru here in CDMA will suggest a short SQL Script
(Query SQL) which will effect this.

Nov 13 '05 #3
ly******@yahoo.ca wrote in
news:11*********************@g47g2000cwa.googlegro ups.com:
HelmutMunich wrote:
Hello, I am Helmut,

my database for multiuser is Frontend/Backend. ...
The code you have posted is inadequate, convoluted, redundant and
generally poor. It is inappropriate for you to attribute "Access
loss of confidence" to its failure to do what you want.


I seldom agree with Lyle, but on this one, I'm in 100% agreement.
IMO, if you were to post the pertinent parts of the design of your
two tables, and a clear description of what you want to do, it's
likely that some JET SQL guru here in CDMA will suggest a short
SQL Script (Query SQL) which will effect this.


The example code shows sequential thinking instead of using SQL to
retrieve the needed data. It's also confused, since you open a
tabletype recordset with recordset variable ART, then turn around
and, without closing the first recordset, assign a different
recordset to the same variable.

I certainly also don't see any reason why you need to use TableType
recordsets, since you're not using SEEK to navigate (which is the
only worthwhile reason to use them).

Also, I have no idea what your code is doing. It looks like
something that a simple UPDATE query ought to be able to do, or that
ought to be done in a form/subform in the first place.

Describe what you're trying to do and how the data in the two tables
relates. Then, perhaps there'd be a chance that we can help untangle
this spaghetti.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #4
Hello,

now I compacted and repaired, backend and frontend, changed the users
rights, avoided to run the password manager - which caused a lot of
trouble, until I fond out - in this user group that I will never run
this dangerous part.

Then I tried to change my statements, started the test and: since
turnover record number 208 I could not see any Art numbers any more.

Actual code:

----cut ---

Set ws = DBEngine.Workspaces(0) 'comes from
Set db = ws.OpenDatabase("D:\CustomersDB\DATA14.MDB") 'instead
currentDB()
Set UST = db.OpenRecordset("Umsätze", dbOpenTable)
'turnaround(dbOpenTable for seek only)
UST.MoveLast
ustAnzrecs = UST.RecordCount
UST.MoveFirst
For ustRecCount = 1 To ustAnzrecs 'counter shows
all turnovers
'If ustRecCount > 200 And ustRecCount < 290 Then 'And
ustRecCount < 700
' MsgBox ustRecCount 'T005207001
' MsgBox UST.Fields(16)
'End If
If Left$(UST.Fields(16), 1) <> " " Then
'**IsNull(UST.Fields(16))
If UST.Updatable Then
UMSART = UST!ART 'Article number
from turnover (Umsätze table)
Descr = UST!descrizione 'and description
'Avoid:Data Type Mismatch Solution: "[WorkOrderID] = " &
Chr(34) & Worder & Chr(34) & ";"
SQLSelect = "SELECT ARTICLE.ART FROM ARTICLE in
'D:\Customersdb\Data14.mdb' " & _
"WHERE ARTicle.ART = " & Chr(34) & UMSART & Chr(34) & "
"
'found in ms-access
users group
Set ART = db.OpenRecordset(SQLSelect, dbOpenForwardOnly)
'dbOpenForwardOnly
If Not ART.EOF Then 'found
ARTART = ART!ART 'get Article number
from Article/Nop-for debug
Else
If ART.Updatable Then 'not found-new record
ART.AddNew
ART!ART = UMSART
ART!descrizione = Descr
ART.Update
End If
End If
ART.Close
Set ART = Nothing
UST.MoveNext
End If
End If
Next '*** For read Loop Umsätze /
Turnover

UST.Close
Set UST = Nothing
--- cut ---

still poor code, Lyle?

best regards, Helmut

Nov 13 '05 #5
Hello, this is helmut again.

I got more Information about "Data loss".
My turnover data come from a AS400. They are sent to Excel, and I
append these lines as recods
to my turnover table. Article number is defined as text. Nu duplicate
keys.
After the first Article number like "T001002003 " with
apparently appended blanks - or
were they Hex Values, before I got them in Excel, no article number is
displayed, when I
want to see them in a Message Box.
Which type of data is really exported by a AS400 ?

Still testing

Helmut

Nov 13 '05 #6
Its OK, I closed after the SQL - found, reopened again and added the
new record. But I cleaned the Turnover file from the appended blanks in
the Article number, which caused the article numbers to disappear from
reading the first time, when an Article number with these appended
blanks should be displayed. Thanks.

Nov 13 '05 #7
"HelmutMunich" <he**************@12move.de> wrote in
news:11**********************@g44g2000cwa.googlegr oups.com:
now I compacted and repaired, backend and frontend, changed the
users rights, avoided to run the password manager - which caused
a lot of trouble, until I fond out - in this user group that I
will never run this dangerous part.

Then I tried to change my statements, started the test and: since
turnover record number 208 I could not see any Art numbers any
more.

Actual code:


I don't know what your code is trying to accomplish and after a
basic scan, it looks to me that it still has all the problems I
mentioned in my previous message.

In short, the problem is not with corrupted data, it's not with
security, it's not with any configuration issues -- the problem is
in your actual code, which isn't doing what you think it's doing.

I can't even tell what that is, since you've not described it in any
detail.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #8
Hello David,

thank you for your feedback. I went through the code, to make it more
comprehensible and then I found out, that the moveNext should go one
end if further. Thats how all article numbers, from the first blank on
seemed to be blank.
Now it works!

After all these new postings I did not imagine that I would hear
another response.

Many thanks, David!! :-)))

Nov 13 '05 #9
"HelmutMunich" <he**************@12move.de> wrote in
news:11*********************@g44g2000cwa.googlegro ups.com:
thank you for your feedback. I went through the code, to make it
more comprehensible and then I found out, that the moveNext should
go one end if further. Thats how all article numbers, from the
first blank on seemed to be blank.
Now it works!

After all these new postings I did not imagine that I would hear
another response.


I'm glad my response, obtuse as it may seem, helped.

I still think you're doing sequentially what ought to be done with
SQL update statements, but I never fully comprehended what you were
trying to accomplish, as I never understood what the problem space
was.

I'm just glad you solved the problem!

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #10

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

Similar topics

2
by: SenseForAll | last post by:
First please note I am a novice at VBA and not even that experienced with DAO/ADO and MS-SQL. Any assistance is appreciated. That said... I have an application written in Access w/ VBA. I need to...
0
by: sid | last post by:
Data loss in Access-97 from VB 6.0 I have encountered Random data loss in our access database. Sometimes the users call in saying that the records entered by them are lost. The users, use our VB...
7
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and...
1
by: keliie | last post by:
I have a relatively simple (I assume) issue which I am at a complete loss to address. My issues is: I want to populate fields in my tables with summary data from the same table. Let me explain: ...
2
by: TerryStone | last post by:
Thanks to anyone who reads this. Below is some C# that compresses an array of bytes, and then decompresses, and compares the original data with the new. Firstly, the length of the decompressed...
18
by: robert | last post by:
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? ...
40
by: rdemyan via AccessMonster.com | last post by:
I have two databases, db1 and db2, with the same table, TableA. I want to select the records from TableA in db1 that have a LAST_UPDATE SomeDate. Then I want to get the identical records in TableA...
8
by: mark_aok | last post by:
Hi all, I have a split database. Both the forms, and the tables are stored on a shared network drive (this is Access 2003). The users use the forms, and the tables on the network drive, there...
3
by: IAuditor | last post by:
Access 2003, XP - I have a multi-table query that is losing data. 1 table is a lookup (Hierarchy), and the other 3 are virtual duplicates (all with a one-to-many relationship with the lookup) except...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.