473,722 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Shifting Between Records

Is there a problem with stability when one uses too many text (memo) fields?
I'm having a problem with data from one record occasionally ending up in
another record, though apparently not through any user interaction.

I'm using SQL 7 and accessing the tables through the ODBC driver. There are
two tables with a one-to-one relationship -- TableA and TableB. TableB is
the one that's having this occasional problem. TableB has about 30 text
fields out of a total of about 50 fields in the table. The problem is
usually with one or two text fields containing data from a different record,
one that was created close to when the problem record was created.

Example: TableB has fields 1-9, say. In one record, field 1 has A, field 2
as B, field 3 has C, and so on.

In another record (created shortly after the other one), field 1 has AA,
field 2 has BB, field 3 has CC, and so on.

The user works with the records, everything's fine. Then one day the user
notices that in the second record, field 1 has AA, field 2 has BB, but field
3 has C instead of CC. In other words, all data's fine, except for one,
maybe two fields, that have data from a previously-created record.

At first glance this seems to be a user-interaction thing, that somehow the
user inadvertantly placed data from the older record into the newer one,
either through a shortcut, or by having that data on the clipboard, or
whatever. But a recent incident opposes that theory.

I have two forms in the front end for editing records (the forms are bound
to the ODBC table links). Form1 is bound only to TableA (the one that
doesn't have the problem); Form2 is bound to a query that is TableA joined
with TableB.

In the recent incident where data shifted, both the record that was affected
and the record from which the data came were both only edited with Form1. In
other words, TableB never came into play; yet its data was somehow affected.

When a record is created, the user completes a few fields in a form, and
then a stored procedure creates a record in TableA and then a sister record
in TableB (using the TableA record's autonumber primary key as its primary
key). A couple of user entered values are entered into the TableB record.
But if the user is using Form1, they never see the TableB record.

In this case, the TableB record's two fields got changed to fields from an
earlier record (one which was created a little earlier the same day), even
though both records were only edited in Form1 (according to the history
log), which doesn't touch TableB.

Thus, I'm wondering if there's a possibility that either the SQL database or
the ODBC driver somehow shifted the data from one record into another. That
seems far-fetched. But, at this point, since a table that the user didn't
touch somehow had its data changed to data from a different record, I'm
trying to explore all possibilities.

Thanks for any insight!

Neil

Mar 23 '08 #1
4 2292
"Neil" <no****@nospam. netwrote in message
news:7u******** *********@nlpi0 68.nbdc.sbc.com ...
Is there a problem with stability when one uses too many text (memo)
fields?
I'm having a problem with data from one record occasionally ending up in
another record, though apparently not through any user interaction.
<snipped>

Thus, I'm wondering if there's a possibility that either the SQL database
or
the ODBC driver somehow shifted the data from one record into another.
That
seems far-fetched. But, at this point, since a table that the user didn't
touch somehow had its data changed to data from a different record, I'm
trying to explore all possibilities.
Can you post the code and DDL for the tables and calls being made?

That might help.

If this were a real bug, I suspect it would be reported by now. (and maybe
it has, have you tried the MS knowledge base?)

Thanks for any insight!

Neil


--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Mar 23 '08 #2
Neil (no****@nospam. net) writes:
Thus, I'm wondering if there's a possibility that either the SQL
database or the ODBC driver somehow shifted the data from one record
into another. That seems far-fetched. But, at this point, since a table
that the user didn't touch somehow had its data changed to data from a
different record, I'm trying to explore all possibilities.
Since your description is very abstract, it's difficult to tell what
is going on, but the likelyhood that the ODBC driver would confuse tables
on its own is nil. The likelyhood that SQL Server would do it also very
small, but it could be a corruption issue. However, a corruption usually
manifests itself with violent error messages. But run DBCC CHECKDB on the
database to rule that out.

I would direct my attention to the application code. That is, the stored
procedures and the client code. Something may not be what you think it is.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 23 '08 #3
Since your description is very abstract, it's difficult to tell what
is going on, but the likelyhood that the ODBC driver would confuse tables
on its own is nil.
A point of clarity: it's not confusing tables, but confusing records. The
correct tables are being updated. But, somehow, a related table had its data
modified in the corresponding record.

I mention the ODBC driver, especially in the context of multiple text
fields, because it has been known to go to the wrong record when going to a
record in a large recordset. In one application, I frequently would have the
ODBC driver go to the record that was exactly 100 in sequence behind the one
it was supposed to go to. I found that moving to the last record before
going to the one I needed resolved the issue. I think it was fixed with a
later patch, though.

Come to think of it, I don't think that was a problem with the ODBC driver,
but with the Jet engine, which was using the ODBC driver to access cs
databases. So it could be a Jet issue, actually.

Point is, a front end engine getting confused when accessing a record in a
cs database via ODBC is not without precedent.
The likelyhood that SQL Server would do it also very
small, but it could be a corruption issue. However, a corruption usually
manifests itself with violent error messages. But run DBCC CHECKDB on the
database to rule that out.
CHECKDB said everything was OK. Didn't think it was SQL Server, but figured
it wouldn't hurt to ask here, especially since the people here might have
come across something like this while using ODBC in some applications.
>
I would direct my attention to the application code. That is, the stored
procedures and the client code. Something may not be what you think it is.
Yes, that would be the likely culprit. Only thing is, there is no code that
updates those fields. And it's usually just one or two fields, not the
entire record, that's awry. Could be something the user's doing; but I can't
imagine what. They say they enter data in the record, check it, everything's
fine. Then, sometime later, they go back and look at the record, and it has
data from another record in one or two fields. It's happening about once or
twice a month now.

Thanks,

Neil
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Mar 23 '08 #4
Neil (no****@nospam. net) writes:
I mention the ODBC driver, especially in the context of multiple text
fields, because it has been known to go to the wrong record when going
to a record in a large recordset. In one application, I frequently would
have the ODBC driver go to the record that was exactly 100 in sequence
behind the one it was supposed to go to. I found that moving to the last
record before going to the one I needed resolved the issue. I think it
was fixed with a later patch, though.

Come to think of it, I don't think that was a problem with the ODBC
driver, but with the Jet engine, which was using the ODBC driver to
access cs databases. So it could be a Jet issue, actually.
Yes, Access or Jet or something else that uses the ODBC driver could
maybe do something like that. But the driver on its own? That seems less
likely to me.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 23 '08 #5

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

Similar topics

16
3031
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For example dsParts.xsd and including that in the data tier. I then will create a class that looks like this Public Class CPart Inherits dsParts
4
1426
by: Tim Smith | last post by:
I have a project that requires logging of data to a file. The file is supposed to hold records until it reaches a certain size, then start shifting the oldest records out as the new data is being written to the file. Anyone know where to find sample code to accomplish this? Thanks
2
2062
by: salsipius | last post by:
Can someone please help me clarify the below code. I think the shifting has to do with converting datatypes and/or loss of data but am not really clear on the details, could you help shed some light please? // Allocate array for( i = 0; i < Length; i++ ) { //pArray_00 is a BYTE Array -- Here a cast is used because
8
4902
by: Eric.Medlin | last post by:
I am reading in 1bit data to a buffer that contains over 30000 bits and I would like to beable to bitshift the entire buffer and AND and OR it with other buffers of the same size. I though I could use the stl bitset class, but I cannot find a way to load the buffer into the bitset. I have been trying with this test program (with the size scaled down to 1024 bits) to load a buffer into the bitset, but prints out all zeros. #include...
10
10697
by: krunalb | last post by:
Hi, I am trying to shift unsigned long long value by 64 bits and this is what i get #include <stdio.h> int main() { unsigned short shiftby= 64;
20
2508
by: Charles Sullivan | last post by:
I understand different processor hardware may store the bits in a byte in different order. Does it make a difference in C insofar as bit-shifting unsigned char variables is concerned? E.g, if I have unsigned char x = 1; is it always true that (x << 1) == 2 (x << 2) == 4 etc?
4
1869
by: Neil | last post by:
I previously posted about data shifting between records in my Access 2000 MDB with a SQL Server 7 back end, using ODBC linked tables. Every once in a while, data from one record mysteriously appears in another record. This incident happened again, this time adding a new wrinkle to the situation. There are two tables -- TableA and TableB -- which have a one-to-one relationship with each other, joined on TableA's autonumber primary key...
0
195
by: hancjiao | last post by:
"Neil" <nospam@nospam.netдÈëÏûÏ¢ÐÂÎÅ:7Tquj.11650$Ej5.10391@newssvr29.news.prodigy.net...
5
1876
by: _dee | last post by:
I'm working on a port of a legacy app originally written in C. Data was compacted into bit fields. Are there any sites or books that cover optimized handling of this type of data? I'd need to develop optimized functions for reading and writing, and given the volume of source, I don't want to end up with pages of obscure code. (Surprisingly, the original C was pretty clear).
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9238
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8052
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.