Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement causes foxpro error
Message
 
 
À
22/04/2002 13:52:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00647711
Message ID:
00647734
Vues:
10
>Hi,
>
>I have a edit box on a form. User types in information and then clicks a search button. code looks like this:
>
>lcSql = "select * from table where upper(fieldname) like '%" + UPPER(lcDescrip) + "%' into cursor myCursor"
>&lcSql
>
>IF the user presses the "enter" key in the edit box we get an error message, critical error 36. I think the problem is that foxpro doesn't like the upper function and the return key. Only problem is that I want this to be a case insensitive search. Any ideas on how to fix this?
>
>Using VFP 7, sp1
>
>Thanks!

try
lcDescrip = strtran(lcDescrip,chr(13),"")
lcDescrip = strtran(lcDescrip,chr(10),"")
lcDescrip = strtran(lcDescrip,chr(9),"")
before your query. We also have similar problem with chr(13) in the EditBox
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform