CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Database or ccs error?

Print topic Send  topic

Author Message
Raxip
Posted: 06/10/2002, 11:31 AM

has anyone had any problems with bookstore application in c#
It works okay but i get this error when admin editorials is selected.
Am going to look at it more this weekend when i have time.


Server Error in '/bookstore' Application.
--------------------------------------------------------------------------------

The column 'editorial_cat_id' was specified multiple times for 'cnt'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: The column 'editorial_cat_id' was specified multiple times for 'cnt'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[OleDbException (0x80040e14): The column 'editorial_cat_id' was specified multiple times for 'cnt'.]
BookStore.AdminEditorials.editorialsDataProvider.GetResultSet(Int32& PagesCount) +728
BookStore.AdminEditorials.AdminEditorials.editorialsBind() +279
BookStore.AdminEditorials.AdminEditorials.Page_Load(Object sender, EventArgs e) +89
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.209; ASP.NET Version:1.0.3705.0
Raxip
Posted: 06/10/2002, 9:21 PM

I got it going , thanks anyway people.
Raxip
Posted: 06/10/2002, 10:20 PM

well, i am still getting the error with the MSSQL database but not access.
raxip
Posted: 06/10/2002, 10:43 PM

Well it seems You have to change Files to Publish from all to project files
Stan Skorobogach
Posted: 06/10/2002, 11:33 PM

Raxip

Do you set for SQL Server conection ServerDatabase Property? It should be set in SQL Server.

b.r.

Stan
raxip
Posted: 06/11/2002, 7:26 AM

Yes of course
Stan Skorobogach
Posted: 06/11/2002, 7:46 AM

Raxip

The errors looks like CCS is generate wrong Count statement for Editorials Grid

Please click on your CCS connection in Project Explorer and look on Properties window. You should find 2 properties - Design Database Type and Server Database Type. Please make sure that for Server Database Type "SQL Server" value is selected. After this open AdminEditorials page and go to on Code tab>AdminEditorialsDataProvider.cs, line 89. You should see following code

Count=new SqlCommand("SELECT COUNT(*) FROM "+ " bs_editorial_categories INNER JOIN (bs_editorials LEFT JOIN bs_items ON bs_editorials.item_id = bs_items.item_id) ON bs_editorial_categories.editorial_cat_id = bs_editorials.editorial_cat_id",Settings.internetDataAccessObject);

If Server Database type is set into "MS Access" for example, this code will following (note that in this case SQL statement is use subquery)

Count=new SqlCommand("SELECT COUNT(*) FROM ("+"SELECT * " +
" FROM bs_editorial_categories INNER JOIN (bs_editorials LEFT JOIN bs_items ON bs_editorials.item_id = bs_items.item_id) ON bs_editorial_categories.editorial_cat_id = bs_editorials.editorial_cat_id"+") cnt",Settings.internetDataAccessObject);

b.r.
Stan
Raxip
Posted: 06/11/2002, 8:05 AM

Thanks stan
Its working now. I thought i had "same as design time" set for the connection but somehow it must have been set to msaccess.

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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