Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This a bug or a limitation - select qry not discriminating
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
This a bug or a limitation - select qry not discriminating
Miscellaneous
Thread ID:
00856410
Message ID:
00856410
Views:
54
In VFP, v8 ~ Have tried running the following query against a 'remote view' cursor (created using the VFP view designer and incorporating only the specific database table to be 'viewed') of data gathered from a single table in an MS SQL database and found that the query returns EVERY record in the original 'view' cursor without discriminating as if the 'WHERE' clause in this query has no effect. There are 3,138 records in the 'view' and the same 3,138 records are returned by the select query (written as below). Note: These 3 parameters are 'key' fields in the table of data origin.

hosp_id = '+ÙF€ÞmÙF€ÞŠì'
mom_id = ',¢>Žt]¢>Žt‰õ'
pat_id = '001340RWZUB'

SELECT bc.* FROM babychg_basic_view1 bc ;
WHERE bc.pat_id = ?pat_id and bc.hosp_id = ?hosp_id

When running exact same query in MS Query Analyzer directly against the same original table (not cursor) in the database, the result correctly returns the specific record according to the parameters.

DECLARE @hosp_id CHAR(20)
DECLARE @mom_id VARCHAR(12)
DECLARE @pat_id VARCHAR(12)

SET @hosp_id = '+ÙF€ÞmÙF€ÞŠì'
SET @mom_id = ',¢>Žt]¢>Žt‰õ'
SET @pat_id = '001340RWZUB'

SELECT bc.* FROM dbo.babychg bc
WHERE bc.pat_id = @pat_id and bc.hosp_id = @hosp_id

Why is VFP apparently not performing the 'WHERE' filtration corrctly herein?
What can be done about this?
Is this a bug or a limitation in VFP?

TIA. /psb
Next
Reply
Map
View

Click here to load this message in the networking platform