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