-->
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: ASP.net 2.0 get connection string
PostPosted: Tue Dec 06, 2005 12:03 pm 
Hi

from what I understand is that in NHibernate you cannot return a dataset
from a stored procedure. I have a stored proc that does not have a mapping file associated, (its just for populating a treeview) and i just want to get the data back and populate my treeview.

whats the best way to do this ?

i can use an IDBcommand but I need a table back

thanks
Mox.


Top
  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 10:30 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
I don't understand why your title is: "ASP.net 2.0 get connection string" and why you choose the "ASP.NET" section...

NHibernate doesn't deal with Dataset and doesn't really support stored procedures. So you can either bind your entities to your controls (after converting them to a dataset if you want) or use a classic ADO.NET approach.

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 12:03 pm 
Newbie

Joined: Tue Dec 06, 2005 10:33 am
Posts: 4
I'm using NHibernate for a lot of my objects and i understand you can call a stored procedure using part of the framework to create a command object for you but this only brings back a data reader. I am using this to populate the table as a temporary solution.

One of the solutions i thought of was to use ADO but get the NHibernate to create a connection for you using its configuration, but this returns a IDBConnection and you cant use that with ADO style calls (requires an SQLConnection)

I would like to get the NHibernate connection string back without opening a connection preferably using the nhibernate framework. If I cant has anyone got an example using the webConfigurationManager in asp.net 2.0 to read the nhibernate section as it sits outside of the appsettings and connection strings section.

Thanks
Mox.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 5:22 am 
Newbie

Joined: Thu Jun 02, 2005 6:00 am
Posts: 12
Location: Ostrava, Czech Republic
Maybe I am mistaken, but i think that Microsoft Enterprise Library supports IDBConnection interface, give it a try...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 8:08 am 
Thanks Dalt,

I'll have a gander at that. :D


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