Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Handling quote characters
Message
De
15/10/2012 11:55:40
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Handling quote characters
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01555033
Message ID:
01555033
Vues:
70
This one has been bugging me for a while and I would like to collect some feedback on how you handle the same in such situation.

This is about quote character comparism. For example, a table of companies containing a company name field. That field could include, sometimes, a quote character such as Mike's Car Repair Shop. This is good. This is saved as is in the database. Now, a specific option requires to do a SQL to try to find that record. If it finds it, it's good. Otherwise, a validation would occur. If the user enters the single quote character as is and we use that in the SQL, the record will be found. But, we have those situations where the user is entering a Backtick or a Closing single quote. So, we have here a triple combinations where the user sees that as all the same.

So, we have to make that transparent. This is like the soundex type in VFP or something similar to that. But, as I want to control everything in regards to it, I guess I'll have to handle it in the code.

I have been thinking of creating a new property in my data class, the one building and executing those SQL commands, to take care of those situations. So, if the property is True, the data class will adjust accordingly the SQL command to include an OR syntax or something like that when it finds such character in the search field. Is this about how you see it or they could be something simpler?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform