These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JetDriver problem? (Urgent)
PostPosted: Tue Oct 23, 2007 3:45 am 
Newbie

Joined: Sat Apr 07, 2007 6:53 am
Posts: 16
Hello forum

I'm working witj NHibernate.JetDriver in order to connect witj an Access97 database. When I want all articles into the database, NHibernate generates it --> SELECT this_.CODIGOARTICULO as CODIGOAR1_7_0_, this_.Description as Descript2_7_0_ FROM ARTICULOS this_

I've executed it as follow also ..>

Code:
            try
            {
                System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/Jordi/Escritorio/Gestion.mdb;User Id=admin;Password=;");
                conn.Open();
                System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand("SELECT this_.CODIGOARTICULO as CODIGOAR1_7_0_, this_.Description as Descript2_7_0_ FROM ARTICULOS this_", conn);
                System.Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter(command);
                System.Data.DataTable taula = new DataTable("MER");
                adapter.Fill(taula);
                conn.Close();

                this.LiniesGridControl.DataSource = taula;
            }
            catch (System.Exception ex)
            {
                System.Console.WriteLine(ex.Message);
            }


But the same problem appears. I think that the problem appears with syntax generated. Can you help me please?

Log file-->
Quote:
[ SELECT this_.CODIGOARTICULO as CODIGOAR1_7_0_, this_.Description as Descript2_7_0_ FROM ARTICULOS this_ ]
[SQL: SELECT this_.CODIGOARTICULO as CODIGOAR1_7_0_, this_.Description as Descript2_7_0_ FROM ARTICULOS this_]
2007-10-23 09:20:40,544 FATAL 11 exceptions - TargetSite-->System.Collections.IList DoList(NHibernate.Engine.ISessionImplementor, NHibernate.Engine.QueryParameters)
2007-10-23 09:20:40,584 FATAL 11 exceptions - Source-->NHibernate
2007-10-23 09:20:40,584 FATAL 11 exceptions - There aren't parameters specified.
2007-10-23 09:20:40,604 FATAL 11 exceptions - TargetSite-->Int32 ExecuteCommandTextForSingleResult(System.Data.OleDb.tagDBPARAMS, System.Object ByRef)
2007-10-23 09:20:40,604 FATAL 11 exceptions - Source-->Microsoft JET Database Engine
2007-10-23 09:26:15,706 FATAL 10 exceptions - could not execute query


Configuration -->

Code:
props["hibernate.dialect"] = "NHibernate.JetDriver.JetDialect, NHibernate.JetDriver";
                    props["hibernate.connection.driver_class"] = "NHibernate.JetDriver.JetDriver, NHibernate.JetDriver";
                    props["hibernate.connection.connection_string"] = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/Jordi/Escritorio/Gestion.mdb;User Id=admin;Password=;";


Mappings -->
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="Model.Entities.Article, Model" table="ARTICULOS" mutable="false">
    <id name="Code" column="CODIGOARTICULO" type="String" unsaved-value="-1">
      <generator class="identity"/>
    </id>
    <property name="Description" type="String"/>
  </class>
</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.