-->
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.  [ 3 posts ] 
Author Message
 Post subject: SQLite error no such table: tablename
PostPosted: Sun Jan 24, 2010 7:45 am 
Newbie

Joined: Sun Jan 24, 2010 7:26 am
Posts: 2
Hello :)

I'm getting this error

Code:
NHibernate.Exceptions.GenericADOException: could not execute update query[SQL: delete from Odredista] --->  System.Data.SQLite.SQLiteException: SQLite error
no such table: tablename.


My configuration file look like this:

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
  <session-factory name="NHibernate.Test">
    <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
    <property name="connection.connection_string">
      Data Source=C:\Users\mona\Desktop\Agencija\Database\Agencija.db;Version=3
    </property>
    <property name="dialect">NHibernate.Dialect.SQLiteDialect</property>
    <property name="query.substitutions">true=1;false=0</property>
    <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
  </session-factory>
</hibernate-configuration>


Mapping file:

Code:
<?xml version="1.0" encoding="utf-8" ?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >
  <class name="Agencija.Odredista, Agencija">
    <id name="Id">
      <generator class="native" />
    </id>
    <property name="NazivOdredista" unique="true" type="string" />
   
  </class>
</hibernate-mapping>



I have test file in other project where everything work perfectly, but when i run this program i get error.


Last edited by ayaami on Mon Feb 01, 2010 2:37 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: SQLite error no such table: tablename
PostPosted: Sun Jan 24, 2010 7:52 am 
Newbie

Joined: Tue Jan 05, 2010 12:15 pm
Posts: 9
Looks like you have no table with the name Odredista in your db.
I got this when my db was not where i specified it to be and sqlite created an empty one (which then had no tables)

Can you open the database with
Code:
sqlite.exe C:\Users\mona\Desktop\Batkovic_Sanja_DZ3\Agencija\Database\Agencija.db

and afterwards put
Code:
.schema

to see if your db is there and has the table.


Top
 Profile  
 
 Post subject: Re: SQLite error no such table: tablename
PostPosted: Sun Jan 24, 2010 9:03 am 
Newbie

Joined: Sun Jan 24, 2010 7:26 am
Posts: 2
Database exist there, but there is no tables.
This is the first time i'm using nhibernate and i googled for a solution, but everything i found didnt help.

I'm using sqlite manager to see database.

And thank you for your help. :)


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

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.