-->
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: SQL syntax error in Hibernate request
PostPosted: Mon Feb 25, 2008 6:46 am 
Newbie

Joined: Mon Feb 25, 2008 6:32 am
Posts: 2
Hello

I'm trying to do a basic
Code:
SELECT * FROM database_schema.table_name


To do such a thing, i use the hibernate loadAll (). I created the TableName class using a reverse engineering. And i call the loadAll() from the class TableNameDao.

I get an org.hibernate.exception.SQLGrammarException : could not execute query.

it says that the following request contains a SQL syntax error

Code:
select column1, column2, ... from database_name.database_schema.table_name


I'm pretty sure that without the database_name in the request, i would work

Code:
select column1, column2, ... from database_schema.table_name


Do anybody have any idea how to tell hibernate not to put the database name in my request.

Thanx


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 7:39 am 
Newbie

Joined: Tue Feb 19, 2008 6:48 am
Posts: 17
What database are you using?

You're using what dialect?

You have to give us more information.

_________________
João Simas


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 8:06 am 
Newbie

Joined: Mon Feb 25, 2008 6:32 am
Posts: 2
I'm using a Informix database.
and the following dialect : org.hibernate.dialect.InformixDialect

I'm a rookie in the hibernate game, so i dont know what kind of info you would need, just ask me

thanx for answering though


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.