473,800 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display Data to DataGridView from ORM

144 New Member
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 1609
jfputnam
1 New Member
Yes for simple mappings, something like

Dim myQuery As IQuery = session.CreateQ uery("from DB_Account where MTC_Account_Num ber = :acctNum")
myQuery.SetPara meter("acctNum" , acctNum)
usersDV.DataSou rce = myQuery.List()
usersDV.DataBin d()


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
3594
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
6086
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
12368
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 problem starts. i've one bit column in my table in SQL SERVER 2000 Database. the DataGridView displays it as "True" or "False". what i want to do is, i want to make it display "Yes" or "No" instead. i don't know what to do. As this is my first...
2
5024
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 column A binds to string A and column B binds to int B. When i start two threads, the datagridview able to show two rows and updated int B at run time. How? public class Foo { public Foo()
0
858
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 colouring and formatting to, and it looks fine when I run it using the debugger, or when I run it from $PATHTOPROJECT/bin/MyApp.exe or $PATHTOPROJECT/obj/debug/MyApp.exe. When I publish and install it, the DataGridView is not formatted. The column...
0
1311
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 public properties. Public Class myObj Friend mID As String Friend mData1 As String Friend mData2 As String Public Sub New(ByVal ID, ByVal Data1, ByVal Data2)
7
1750
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 fields but display the decrypted data in the controls instead of the encrypted data. I also want to use a binding navigator to scroll through the records and to add/delete records. I don't have a problem with the encryption/decryption but am...
3
5257
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 (like CTRL+ALT+SHIFT). TO this point I have code that only displays the context menu while keys CTRL +ALT+SHIFT are pressed - but after the keys are released the context menu still gets displayed. Can someone tell me where the following code is...
2
8439
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 datamember, it only let me display 1 table. Is there a way I could the 2 tables in my datagridview ? Thanks
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.