-->
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: Generated sql problem
PostPosted: Fri Nov 18, 2005 11:01 am 
Can someone help me on this

Im mapping the northwind db
the select seem ok but it says it has Incorrect syntax near the Order keyword ?
---------------------------------------------------------

2005-11-18 09:14:05,453 [2972] DEBUG NHibernate.Impl.BatcherImpl - Building an IDbCommand object for the SqlString: SELECT orderdetai0_.OrderID as OrderID__, orderdetai0_.ProductID as ProductID__, orderdetai0_.OrderID as OrderID0_, orderdetai0_.ProductID as ProductID0_, orderdetai0_.UnitPrice as UnitPrice0_, orderdetai0_.Quantity as Quantity0_, orderdetai0_.Discount as Discount0_ FROM dbo.Order Details orderdetai0_ WHERE orderdetai0_.OrderID=:OrderID
2005-11-18 09:14:05,453 [2972] DEBUG NHibernate.Type.Int32Type - binding '11074' to parameter: 0
2005-11-18 09:14:05,453 [2972] INFO NHibernate.Loader.Loader - SELECT orderdetai0_.OrderID as OrderID__, orderdetai0_.ProductID as ProductID__, orderdetai0_.OrderID as OrderID0_, orderdetai0_.ProductID as ProductID0_, orderdetai0_.UnitPrice as UnitPrice0_, orderdetai0_.Quantity as Quantity0_, orderdetai0_.Discount as Discount0_ FROM dbo.Order Details orderdetai0_ WHERE orderdetai0_.OrderID=@p0
2005-11-18 09:14:05,453 [2972] DEBUG NHibernate.SQL - SELECT orderdetai0_.OrderID as OrderID__, orderdetai0_.ProductID as ProductID__, orderdetai0_.OrderID as OrderID0_, orderdetai0_.ProductID as ProductID0_, orderdetai0_.UnitPrice as UnitPrice0_, orderdetai0_.Quantity as Quantity0_, orderdetai0_.Discount as Discount0_ FROM dbo.Order Details orderdetai0_ WHERE orderdetai0_.OrderID=@p0
2005-11-18 09:14:05,484 [2972] DEBUG NHibernate.Util.ADOExceptionReporter - SQL Exception
System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'Order'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session)

---------------------------------------------------------------


Top
  
 
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.