Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter Issues
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
CursorAdapter Issues
Miscellaneous
Thread ID:
00823597
Message ID:
00823597
Views:
55
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?
- Jayesh
Next
Reply
Map
View

Click here to load this message in the networking platform