Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL-Insert
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00601657
Message ID:
00602020
Vues:
25
>Hi everyone.
>
>Here's what I'm trying to do. I have a form that has a comments field on it, and when the user hits submit I email the form answers to my address. Using CDONTS is easy and great for this.
>
>But here's where I run into problems. I'm using the INSERT SQL Command to add a record to my feedback database. If the user enters any special characters, like period, comma...whatever....iget the syntax error or some other error.
>
>I'm using Foxpro databases(dbf) with a memo field for the comments. I've tried Macro Substituition with Vbscript, and i've also written the comments out to a text file. But I really need to know if there is a command that I can include in the SQL statement that will do the job quick and clean.
>
>Thanks.

Just create a function for your site that will parse the special characters out of the form variables before you create the SQL string. You pass the form variable to the function and the function returns the variable with the special characters either parsed or replaced.
Tim Westmoreland
Software Engineer
Skyline Technologies, Inc.

"Upper classes are a nation's past; the middle class is its future." - Ayn Rand, Russian-born author (1905-1982).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform