-->
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.  [ 5 posts ] 
Author Message
 Post subject: Weird Query Error
PostPosted: Sun Sep 13, 2009 5:27 pm 
Newbie

Joined: Sun Sep 13, 2009 10:10 am
Posts: 5
Code:
  IManagerFactory manager = new ManagerFactory();
            IListManager ls = manager.GetListManager();
            IList<List> l = ls.GetAll();


i get this error, when i try to get data from server. i don't know why :(

Code:
could not execute query
[ SELECT top 100 this_.OID as OID0_0_, this_.Name as Name0_0_, this_.SiteName as SiteName0_0_, this_.Statue as Statue0_0_, this_.UserID as UserID0_0_ FROM MailList.dbo.dbo.Lists this_ ]
[SQL: SELECT top 100 this_.OID as OID0_0_, this_.Name as Name0_0_, this_.SiteName as SiteName0_0_, this_.Statue as Statue0_0_, this_.UserID as UserID0_0_ FROM MailList.dbo.dbo.Lists this_]


thanks.
Greetins From Turkiye.


Top
 Profile  
 
 Post subject: Re: Weird Query Error
PostPosted: Mon Sep 14, 2009 2:19 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Check the inner exception for more information. What happens when you run the statement yourself ?

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: Weird Query Error
PostPosted: Mon Sep 14, 2009 4:20 pm 
Newbie

Joined: Sun Sep 13, 2009 10:10 am
Posts: 5
sorry, it's my bad. i forget c/p inner exception.

NHibernate.AdoException
Code:
{"could not execute query\r\n[ SELECT top 100 this_.OID as OID0_0_, this_.Name as Name0_0_, this_.SiteName as SiteName0_0_, this_.Statue as Statue0_0_, this_.UserID as UserID0_0_ FROM MailList.dbo.dbo.Lists this_ ]\r\n[SQL: SELECT top 100 this_.OID as OID0_0_, this_.Name as Name0_0_, this_.SiteName as SiteName0_0_, this_.Statue as Statue0_0_, this_.UserID as UserID0_0_ FROM MailList.dbo.dbo.Lists this_]"}


Inner Exception
Code:
{"Could not find server 'MailList' in sysservers. Execute sp_addlinkedserver to add the server to sysservers."}


i guess, i need more read about nhibernate.


Top
 Profile  
 
 Post subject: Re: Weird Query Error
PostPosted: Tue Sep 15, 2009 2:03 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Is "MailList.dbo.dbo.Lists" really your full tablename. There's probably a "dbo" too much in there. But the error message sounds more like something wrong with your db server. Checkout this:

http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/fcd974ec-8bf3-440a-8a13-1b26cb504f77

I think this error has nothing to do with hibernate.

_________________
--Wolfgang


Top
 Profile  
 
 Post subject: Re: Weird Query Error
PostPosted: Tue Sep 15, 2009 4:53 pm 
Newbie

Joined: Sun Sep 13, 2009 10:10 am
Posts: 5
Thank you so much dude. My problem has solved by your help.
In a mapping file table name contains 'dbo' prefix and that makes the error.

Code:
<class name="MailList.Data.BusinessObjects.List, MailList.Data" table="[b]dbo[/b].Lists" lazy="true">


You're the man. Thank you again for the incredibly turnaround on the issue.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.