Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select statement returns a jumbled table
Message
From
07/04/2002 23:03:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Select statement returns a jumbled table
Miscellaneous
Thread ID:
00642023
Message ID:
00642023
Views:
59
Hi All,

We have a table called "fielddetails" with the following fields:
nTableID - I
cFieldName - C(30)
nKeyField - I
nUpdatable - I
cUpdateName - C(50)
cCaption - C(50)
cComment - M
cDataType - C(10)
This table contains a row for each field in each table in our database (about 1500 rows in total), all of our tables have been given a unique numeric table id, it looks like this :
1  |  cField1 | 0 | 1 | Table1.cField1 | Field Caption 1 | memo | C(10)
1  |  nField2 | 1 | 1 | Table1.nField2 | Field Caption 2 | memo | I
1  |  tField3 | 0 | 1 | Table1.tField3 | Field Caption 3 | memo | T
1  |  cField4 | 0 | 1 | Table1.cField4 | Field Caption 4 | memo | C(50)
1  |  nField5 | 0 | 1 | Table1.nField5 | Field Caption 5 | memo | I
The problem we are having is that when we run a select such as the following using SQL Passthrough:
select * from FieldDetails where ntableid = 1
approximately 3/4 of the time the result will be returned with columns showing a value from a different row such as the following (look at the caption column row 2 and 3, and the type column row 2 and 4):
1  |  cField1 | 0 | 1 | Table1.cField1 | Field Caption 1 | memo | C(10)
1  |  nField2 | 0 | 1 | Table1.nField2 | Field Caption 3 | memo | C(50)
1  |  tField3 | 0 | 1 | Table1.tField3 | Field Caption 2 | memo | T
1  |  cField4 | 0 | 1 | Table1.cField4 | Field Caption 4 | memo | I
1  |  nField5 | 0 | 1 | Table1.nField5 | Field Caption 5 | memo | I
Whenever the problem occurs it is always with different rows, never to the same row.

The same thing will happen wether using SQL Server 2000 or Visual FoxPro as the database. We are using the following versions of the relevant items:
Visual FoxPro 7 Service Pack 1
SQL Server 2000
Windows XP and Windows 2000 Service Pack 2
VFP ODBC Driver Version 6.01.8629.01
SQL Server ODBC Driver 2000.81.7713.00
If anybody has any ideas on what might be causing this, we would love to here them.

Thanks in advance,

Chris Ormerod
Have a nice day :)
Next
Reply
Map
View

Click here to load this message in the networking platform