Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to get local view SQL code to debug
Message
From
28/11/2000 14:50:56
 
 
To
28/11/2000 14:37:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00446366
Message ID:
00446375
Views:
7
>Hi Y'all,
>
>I have a local view that when it is updated, it does the odd "wierd" thing to the table - much as if I had hand-written an "update" statement that had some logic error in it.
>
>Is there any way I can grab the actual SQL statement that VFP is using to do the table update? This is a local view using VFP as the data engine so it's not like I am using ODBC or SQL server where I can capture what is being sent to the back end. I looked around for a SYS() command that might give this to me but I could not find anything.
>
>Albert Gostick

You don't say what "weird" stuff is happening, but here's a start.

The WhereType tells you what would be added:

1 - Key fields only: e.g., if keyfield = "iid" and current row iid = 3 then tags this to the update: "WHERE iid = 3"

2 - Key and Updatable fields - in addition to the key field, adds to the where down the list of updatable fields, e.g.: "WHERE iid = 3 AND field1= old_field1_value AND field2 = ...."

3 - Key and Modified fields - same as 2, but for modified fields instead of updatable, e.g. if only field2 was modified: "WHERE iid = 3 AND field2 = old_field2_value"

4 - Key and Timestamp - more applicable to SQL Server remote views - same as 1, but compares timestamps as well, e.g., "WHERE iid = 3 AND timestamp=old_timestamp_value"

My guess is you have a couple of different records that match the WHERE that is added.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform