473,379 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Display Data to DataGridView from ORM

144 100+
hello,

i usually simply use DataAdapter or DataReader to get data from database.now, i'm thinking to use ORM to help ease OO development.

but then because i have the need to display the data in a DataGridView, filling query result to a DataTable from a DataAdapter is simple enough. i don't know if it's better to use ORM or not.

is filling data generated from ORM to a DataGridView is simple enough? if the ORM framework used is NHibernate for example.

Thank you.
Dec 19 '09 #1
1 1591
Yes for simple mappings, something like

Dim myQuery As IQuery = session.CreateQuery("from DB_Account where MTC_Account_Number = :acctNum")
myQuery.SetParameter("acctNum", acctNum)
usersDV.DataSource = myQuery.List()
usersDV.DataBind()


You can use an IList as the datasource.
Dec 30 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: neilsanner | last post by:
Hi, I would like to, at runtime, beeing able to choose a table from a .mdb (microsort access) database and display it in a dataGridView. Is this possible? Any ideas? neilsanner
3
by: Manfred | last post by:
Hi all How can I display the result of a sqlcommand select in a datagridview. I guess need a dataset as result to connet it as datasource to the datagrid? Thanks in advance
3
by: Lucky | last post by:
hi guys, it's me again. now days i'm learning DataGridView of .NET 2.0. i found that some of the features are quite attractive but sometimes they are not easy to modify and from that point our...
2
by: Ivan | last post by:
I have a class Foo which have two property. I have a thread that do some process and update class Foo int B. I have a datagridview on main form. this datagridview data source to this class Foo and...
0
by: lord.zoltar | last post by:
I'm having a problem with the behaviour of my program when run through the debugger versus the way it behaves when run as a published executable. I have a DataGridView that I apply custom...
0
by: krigare | last post by:
There maybe a better way of doing this but I am attempting to display a list of objects and their respective properties using a datagridview. The object class is straight forward with several...
7
by: =?Utf-8?B?aWxy?= | last post by:
Hi I have a table in an sql database that contains data that has been encrypted using the DPAPI. What I am trying to achieve is to bind several controls on a vb 2005 windows form to those...
3
by: hzgt9b | last post by:
Using VS2005, VB.NET, I am developing a windows app that has a DataGridView. I want to enable the display of a context menu on this DataGridView only when a specific set of keys is also pressed...
2
by: rav500 | last post by:
I am using visual studio 2005, .NET2.0 I am reading xml data into a dataset and bind the it to a datagridview I have 2 tables in my xml that I would like to bind to the datagridview. Using...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.