This topic is locked

CS0246 C# Compile Error

4/19/2008 2:44:47 PM
ASPRunner.NET General questions
Y
ynyng author

ASPRunner.net 4.0 build 173. Single table site. Here is the compile error (on Line 29):

****

Line 27: public void Insert( String Manager, String Location, String Email, String Phone, String Address, String City, String State, String Zip)

Line 28: {

Line 29: UsmManagers item = new UsmManagers(); <----ERROR LINE

Line 30:

Line 31: item.Manager = Manager;
Source File: c:\Inetpub\wwwroot\USM2\App_Code\UsmManagersRunnerController.cs Line: 29

****

Here is the relevent portion of the source from the offending file:

****

using System;

using System.Text;

using System.Data;

using System.Data.SqlClient;

using System.Data.Common;

using System.Collections;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration;

using System.Xml;

using System.Xml.Serialization;

using SubSonic;

using SubSonic.Utilities;

namespace Data

{

/// <summary>

/// Controller class for Orders

/// </summary>

public partial class UsmManagersController

{
/// <summary>

/// Inserts a record, can be used with the Object Data Source

/// </summary>

[DataObjectMethod(DataObjectMethodType.Insert, true)]

public void Insert( String Manager, String Location, String Email, String Phone, String Address, String City, String State, String Zip)

{

UsmManagers item = new UsmManagers();
item.Manager = Manager;

item.Location = Location;

item.Email = Email;

item.Phone = Phone;

item.Address = Address;

item.City = City;

item.State = State;

item.Zip = Zip;

item.Save(UserName);

}

****

I also get an error when I build in VB. Ideas/solutions?
Thanks!

Eugene 4/21/2008

Please send me full error description (page screenshot)

D
delphin 4/21/2008

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'Data.WebFatura' is not defined.
Source Error:
Line 119:

Line 120: If e.Row.RowType = DataControlRowType.DataRow Then

Line 121: Dim rowData As Data.WebFatura

Line 122: rowData = DirectCast(e.Row.DataItem, Data.WebFatura)

Line 123:
Source File: C:\demo\demo5\Project1\output\WEB_Fatura_list.aspx.vb Line: 121
Show Detailed Compiler Output:
Microsoft ® Visual Basic Compiler version 8.0.50727.1433

for Microsoft ® .NET Framework version 2.0.50727.1433

Copyright © Microsoft Corporation. All rights reserved.
C:\demo\demo5\Project1\output\WEB_Fatura_list.aspx.vb(121) : error BC30002: Type 'Data.WebFatura' is not defined.
Dim rowData As Data.WebFatura


C:\demo\demo5\Project1\output\WEB_Fatura_list.aspx.vb(122) : error BC30002: Type 'Data.WebFatura' is not defined.
rowData = DirectCast(e.Row.DataItem, Data.WebFatura)
Eugene 4/22/2008

If you use MSSQL server, ensure that you entered login and password on page "Connect to MSSQL" (step 2) in wizard.

Currently ASPRunner.NET doesn't support Windows Authentication mode and you need userid and password for DAL files generation.

Y
ynyng author 4/22/2008

Thanks Eugene. That resolved the issue.