|
-
May 23rd, 2007, 09:51 AM
#1
Thread Starter
Addicted Member
recordsets in datagridview
I am using VB.NET 2005, I have a datagridview that I want the user to be able to update with an ADO recordset .I could do this in Vb6 with datagrids, by setting the datasource, but not able to in VB NET. I see on the forums that it is recommended to use ADO.NET. But I really don't want to do anyting fancy here, is there not a way to do this? simply without learning something new each time..
CN = New ADODB.Connection
RS_Stations = New ADODB.Recordset
CN = Globals.Connect_Database
RS_Stations.Open("SELECT * FROM Stations", CN, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
DG_Stations.DataSource = RS_Stations
-
May 23rd, 2007, 08:56 PM
#2
Re: recordsets in datagridview
If you're developing in VB.NET then you need to learn ADO.NET, plain and simple. If you're not doing anything fancy then now is the perfect time to start. This will only take a you a few lines of code.
http://www.vbforums.com/showthread.php?t=469872
-
May 24th, 2007, 06:28 AM
#3
Thread Starter
Addicted Member
Re: recordsets in datagridview
THanks JM,
THat set me on the right path. I really like ADO and you are right this is a perfect time to learn .Net with an simple task. It is sometimes hard to always be learning "new" on the job, for something due yesterday. Your post was very helpful.
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|