Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter Issues
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00823597
Message ID:
00823750
Views:
24
It's a PRIVATE variable used as a view parameter. I initialize it with '%' (string).

>>Form's DataEnvironment has one CursorAdapter. The SelectCMD contains one parameter: e.g.
>>
>>
SELECT * FROM Customer WHERE FirstName LIKE ?vp_FirstName
>>
>>I am using SQL Server and FirstName is char(30) field. As per documentation, when I issue CursorFill(), VFP generates ADODB.Command object behind the scene and builds the cursor. I have noticed something strange here. When I set vp_FirstName to '%', it doesn't return all rows. I got the SQL from SQL Profiler which looks like this:
>>
>>
 exec sp_executesql N'select * FROM Customer WHERE Customer.FirstName LIKE @P1 ', N'@P1 char(30)', '%                             '
>>
>>
>>Notice that it appeneds 29 trailing spaces to the parameter value and that's why it is not working the way I would expect. If I change the Data Type to VARCHAR(30), it works.
>>
>>Has anyone noticed this too?
>
>Hi Jayesh,
>
>What is vp_FirstName? Is it a field or memvar? If it is field, what is the data type?
>
>Thanks,
>Aleksey.
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform