Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8549573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:44:48+00:00 2026-06-11T13:44:48+00:00

I have an error with this code and I don’t know why. My code

  • 0

I have an error with this code and I don’t know why.

My code is composed of two files:

  1. systemprop.cs
  2. System.hbm.xml

But I have the following error:

Erreur de syntaxe près de ‘[propertyID] as column1_19_, systemprop0_.[value] as column2_19_, systemprop0_.[‘ à la ligne 1″

which means that I have a syntax error near '[propertyID] as column1_19_, systemprop0_.[value] as column2_19_, systemprop0_.[', at line 1.


Here’s my code:

class Systemprop:

using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using DATA;

namespace DATA
{
    public partial class Systemprop
    {
        private string PropertyID  { set; get; }
        private string Value        { set; get; }
        private string Description   { set; get; }
        private int LastUpdateTime     { set; get; }
        private int CreationTime    { set; get; }
        // public Systemprop() { }

        public static ISessionFactory SessionFactory;
        public static ISession OpenSession()
        {
            if (SessionFactory == null)
            {
                Configuration config = new Configuration();
                config.SetProperty(NHibernate.Cfg.Environment.ConnectionProvider, "NHibernate.Connection.DriverConnectionProvider");
                config.SetProperty(NHibernate.Cfg.Environment.Dialect, "NHibernate.Dialect.MySQLDialect");
                config.SetProperty(NHibernate.Cfg.Environment.ConnectionDriver, "NHibernate.Driver.MySqlDataDriver");

                config.SetProperty(NHibernate.Cfg.Environment.ConnectionString, "Server=localhost;Database=opengts;Uid=root;Pwd=;");
                config.AddAssembly("DATA");

                SessionFactory = config.BuildSessionFactory();
            }
            return SessionFactory.OpenSession();
        }
        public static IList<Systemprop> GetSystemprop()
        {
            using (ISession session = OpenSession())
            {
                if (session != null)
                {
                    IQuery query = session.CreateQuery("FROM Systemprop");
                    IList<Systemprop> pets = query.List<Systemprop>();
                    return pets;
                }
            }

            return null;    
        }
    }
}

Systemprop.hbm.xml:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="DATA" assembly="DATA">
    <class name="Systemprop" table="[dbo].[systemprops]" >
        <id name="PropertyID" column="[propertyID]" type="String" length="32" >
            <generator class="assigned" />
        </id>
        <property name="Value" column="[value]" type="String" not-null="false" length="16" /> 
        <property name="Description" column="[description]" type="String" not-null="false" length="128" /> 
        <property name="LastUpdateTime" column="[lastUpdateTime]" type="Int32" not-null="false" /> 
        <property name="CreationTime" column="[creationTime]" type="Int32" not-null="false" /> 
    </class>
</hibernate-mapping>

But I have this error:

[MySqlException (0x80004005): Erreur de syntaxe près de '[propertyID] as column1_19_, systemprop0_.[value] as column2_19_, systemprop0_.[' à la ligne 1]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +277
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) +73
   MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) +20
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +100
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +742
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1620
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +12
   NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) +292
   NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +244
   NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +186
   NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +129
   NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +116

[GenericADOException: could not execute query
[ select systemprop0_.[propertyID] as column1_19_, systemprop0_.[value] as column2_19_, systemprop0_.[description] as column3_19_, systemprop0_.[lastUpdateTime] as column4_19_, systemprop0_.[creationTime] as column5_19_ from [dbo].[systemprops] systemprop0_ ]
[SQL: select systemprop0_.[propertyID] as column1_19_, systemprop0_.[value] as column2_19_, systemprop0_.[description] as column3_19_, systemprop0_.[lastUpdateTime] as column4_19_, systemprop0_.[creationTime] as column5_19_ from [dbo].[systemprops] systemprop0_]]
   NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +213
   NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +18
   NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) +79
   NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters) +51
   NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters) +231
   NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) +369
   NHibernate.Impl.SessionImpl.List(String query, QueryParameters queryParameters, IList results) +317
   NHibernate.Impl.SessionImpl.List(String query, QueryParameters parameters) +282
   NHibernate.Impl.QueryImpl.List() +163
   DATA.SystempropExtensions.GetSystemprop() in C:\Users\HP\Desktop\our_project\DATA\Queries\Systemprop.cs:37
   MvcApplication7.Controllers.AccueilController.Index() in C:\Users\HP\Desktop\our_project\MvcApplication7\Controllers\AccueilController.cs:16
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841105
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Any ideas how can I solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:44:49+00:00Added an answer on June 11, 2026 at 1:44 pm

    Take out all of the brackets and the dbo from your mapping document. Just use the table and column names as you would enter them in the database. Then give it a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't really know XSL but I need to fix this code, I have
I have two dropdownlist in one view but i don't know if i can
I have this code (ok, I don't, but something similar :p) var dogs =
I keep getting uncaught handler error in this code and I don't know why.
I have a code but in this code there is an error and I
i have an error in this code NSString *str = @above string; //load above
I have this code and I couldn't run it because i get this error:
I get this error, while I'm testing the code below: You have an error
I have this code: ie1.link(:text, /Exception:/) It is producing an error message which I
I have this code to suppress all errors. When an error occurs a blank

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.