Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with long string in an SQL statement
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00582595
Message ID:
00582613
Views:
23
Sorry Ben - probably not explained it too well - I am passing various text strings into an SQL statement...

lcSurname = "customers.cu_surname = '" + alltrim(.txt_13.value) + "'"

SELECT Customers.* FROM gen_data!customers WHERE &lcSurname AND &lcAge AND &lcPostCode AND &lcDate AND lcDepartment into cursor temp

One of the strings is lcDepartment and is several hundred characters long - something like..

lcDepartment = "customers.cu_depta = .t. AND customers.cu_depta = .f. AND customers.cu_deptb = .t. AND customers.deptb = .f." etc etc

Each record has 9 logical fields which are departments - I need to return all the records regardless of department being true or false - but I have to supply something to my SQL statement...

Hope it makes sense???
Chris Maiden
Email
Web
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform