CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Insert Statement Errors - Newbie needs help

Print topic Send  topic

Author Message
jimlocigno

Posts: 14
Posted: 12/02/2004, 6:20 PM

Okay had to take a temporary break from figuring out code charge - am back now and still very new at this. :-D

Anyway, when I try and add a record via the webpage I created I get

Microsoft JET Database Engine:Syntax error in INSERT INTO statement.


Is there anyway to get a more specific message as to what is wrong the insert statement. Thanks.

Jim
View profile  Send private message
mrachow


Posts: 509
Posted: 12/03/2004, 1:15 AM

From the Component Reference
Additionally, you can use the Before Execute Select event of a Grid to examine the Grid's SQL statement
with the following code:
System.Web.HttpContext.Current.Response.Write(Select.ToString());
System.Web.HttpContext.Current.Response.Write(_Select.ToString())
When seeing the statement you maybe will find the problem.

plus
a wild guess
I had an issue when placing entry fields as first controls on a record form that were not tied to a database column. Then a wrong SQL statement was generated (the column list started with a comma).
I had worked around that by setting the Control Source Type of such unrelated controls to Code Expression even so that property shouldn't matter for not database related controls.
_________________
Best regards,
Michael
View profile  Send private message
jimlocigno

Posts: 14
Posted: 12/03/2004, 3:12 AM

Thanks very much for the reply I have tried to add what you sent but I get this error when trying to publish the project

  
Error: C:\DOCUME~1\Jim\LOCALS~1\Temp\~vtrack\components\days_offDataProvider.vb(609) : error BC30201: Expression expected.  
  
System.Web.HttpContext.Current.Response.Write(Select.ToString())  
                                              ~~~~~~              
Error: C:\DOCUME~1\Jim\LOCALS~1\Temp\~vtrack\components\days_offDataProvider.vb(610) : error BC30451: Name '_Select' is not declared.  
  
System.Web.HttpContext.Current.Response.Write(_Select.ToString())  
                                              ~~~~~~~              


I'm sure it's something simple that I am missing but don't what!!

Jim
View profile  Send private message
mrachow


Posts: 509
Posted: 12/03/2004, 3:42 AM

Sorry I'm not that familar with .NET
If I interpret the manual correct if statements for .NET are given the first one is for C# the second one for VB.
So use the second only.
Maybe the underscore in front of Select is a typo?
Plus are you sure being in the right event (Before Execute Select of the grid)?
_________________
Best regards,
Michael
View profile  Send private message
Stan
Posted: 12/05/2004, 11:13 PM

Michael

In case of Record form, the correct event will be Before Execute Select of Record form with following code

System.Web.HttpContext.Current.Response.Write(Select_.ToString())

Note that underscore is placed at the end of Select.


Stan

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.