How do i populate a datagrid using a MS Access database table?
i have established a connection to the database and have a recordset made........then what do i do to have the data shown in the datagrid cells?
Printable View
How do i populate a datagrid using a MS Access database table?
i have established a connection to the database and have a recordset made........then what do i do to have the data shown in the datagrid cells?
After initializing your connection obj and filling your dataset , do this .
VB Code:
DataGrid1.DataSource = ds.Tables(0)
Wait , there is no recordset obj in ADO.NET . Are you working with the old database in VB6 .Quote:
Originally posted by vector9
How do i populate a datagrid using a MS Access database table?
i have established a connection to the database and have a recordset made........then what do i do to have the data shown in the datagrid cells?
sorry but i dont really know what exactly to say.......but
i have objRS as new ADODB.Recordset
That's what I thought . Hmm , why don't you try ADO.NET , easier , faster , lost of nice features ..etc . ??Quote:
Originally posted by vector9
sorry but i dont really know what exactly to say.......but
i have objRS as new ADODB.Recordset
could you provide me with a link of where i can get this.... it is just a download right?
a silly question : are you using VB.NET ?:rolleyes:Quote:
Originally posted by vector9
could you provide me with a link of where i can get this.... it is just a download right?
of course.
the reference i add is that of Microsoft ActiveX Data Object Library 2.7
so i take it since i have vs.net it came with ado . net?
Exactly , read more about it to make use of the great features it offers .Quote:
Originally posted by vector9
so i take it since i have vs.net it came with ado . net?
ok thanks man
;)
since i cannot really grasp ado.net really quick.......is there any way using ADO 2.7 like i have been and populate a datagrid with the contents of a table?
I recommend ado.net from novice to pro. For anyone completely new to datasets. My favorite of my 4 ado.net books
sorry but i dont have time to go get a book............ know of any really good tuturials? that actually walk you through the code.
Best links for ADO.NET , taste the power of ADO.NET ;) http://samples.gotdotnet.com/quickst...soverview.aspx
http://www.c-sharpcorner.com/Beta%202/adonet1.asp
http://www.devhood.com/tools/tool_de...px?tool_id=611
http://docs.alphora.com/ANTADONetTut.html
there is a really good ado.net site here:
Click here
Do not click on the link that Booya05 provided. It is a Javascript popup page.
i got a few examples of using ado.net on my website. Take a look. http://www.vb-tech.com
Vector9 is an idiziot.
Don't cry
Don't raise your eye
It's only teenage wasteland
Sally take my hand
And travel south crossland
Put out the fire
And don't look past my shoulder
The Exodus is here
The happy ones are near
Let's get together
Before we get much older
No one knows what it's like
To be the bad man
To be the sad man
Behind blue eyes
No one knows what it's like
To be hated
To be fated
To telling only lies
But my dreams
They aren't as empty
As my conscience seems to be
I have hours, only lonely
My love is vengeance
That's never free
No one knows what it's like
To feel these feelings
Like I do
And I blame you
No one bites back as hard
On their anger
None of my pain and woe
Can show through
But my dreams
They aren't as empty
As my conscience seems to be
I have hours, only lonely
My love is vengeance
That's never free
When my fist clenches, crack it open
Before I use it and lose my cool
When I smile, tell me some bad news
Before I laugh and act like a fool
If I swallow anything evil
Put your finger down my throat
If I shiver, please give me a blanket
Keep me warm, let me wear your coat
No one knows what it's like
To be the bad man
To be the sad man
Behind blue eyes
I love that :) 'Who's Next' was one of the early disks i bought years ago.Quote:
Originally posted by Booya05
No one knows what it's like
To be the bad man
To be the sad man
Behind blue eyes
...