Re: SQL Syntax problem
There is one more issue to consider, among:
a) Correct number of fileds and values
b) enclosing text,date fields with quotes, numeric fields without quotes
c) putting a default value for fields if the submitted data is empty
In the text fields, if the user types something like:
or any word which includes a hyphen in it, the statement will give syntax
Either do not allow to accept a hyphen OR validate and trim the field b4
executing SQL statement.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL