|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I use connected mode instead of disconnected?I would like to bind some datagrids to datasource and have them update the
database when a row is changed. I don't like the disconnected mode. I am developing a Windows Form app, not an ASP.net app. Would like to have the same functionality as I did with VB6 and Delphi.... Thanks Use the ADO Recordset through COM InterOp then. ADO.NET doesn't really
provide a mechanism to do what you are looking for. Mostly becuase it is not as efficient (connected mode) and more dangerous to your data. Show quoteHide quote "Brooke" <tbroo***@hotmail.com> wrote in message news:%23lyzvaTZHHA.3928@TK2MSFTNGP03.phx.gbl... >I would like to bind some datagrids to datasource and have them update the >database when a row is changed. I don't like the disconnected mode. I am >developing a Windows Form app, not an ASP.net app. > > Would like to have the same functionality as I did with VB6 and Delphi.... > > Thanks > What functionality are you looking for?
-- Show quoteHide quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "Brooke" <tbroo***@hotmail.com> wrote in message news:%23lyzvaTZHHA.3928@TK2MSFTNGP03.phx.gbl... >I would like to bind some datagrids to datasource and have them update the >database when a row is changed. I don't like the disconnected mode. I am >developing a Windows Form app, not an ASP.net app. > > Would like to have the same functionality as I did with VB6 and Delphi.... > > Thanks > I guess that I am taking the lazy route. I would like to avoid counting on
the user to click "Save" after editing data on a form or datagrid. All of our current apps save the record when you change rows. Also thought that it may reduce the amount of code required for updates, inserts, deletes, and user concurrency. I need to have this major db app up and running it less than two weeks, and I calculated that after I create the data classes, data access classes, stored procedures, and concurrency checking that I at least a few thousand lines of code to write and debug... Thanks Show quoteHide quote "Miha Markic [MVP C#]" <miha at rthand com> wrote in message news:5BF97572-A47C-4BA1-A89D-C069EF12E3F4@microsoft.com... > What functionality are you looking for? > > -- > Miha Markic [MVP C#, INETA Country Leader for Slovenia] > RightHand .NET consulting & development www.rthand.com > Blog: http://cs.rthand.com/blogs/blog_with_righthand/ > > "Brooke" <tbroo***@hotmail.com> wrote in message > news:%23lyzvaTZHHA.3928@TK2MSFTNGP03.phx.gbl... >>I would like to bind some datagrids to datasource and have them update the >>database when a row is changed. I don't like the disconnected mode. I am >>developing a Windows Form app, not an ASP.net app. >> >> Would like to have the same functionality as I did with VB6 and >> Delphi.... >> >> Thanks >> > > "Brooke" <tbroo***@hotmail.com> wrote in message I don't think this approach works for any serious application for many news:OzBmr8VaHHA.1388@TK2MSFTNGP05.phx.gbl... >I guess that I am taking the lazy route. I would like to avoid counting on >the user to click "Save" after editing data on a form or datagrid. All of >our current apps save the record when you change rows. reasons. What about transactions for example? Anyway, if you really want an automatic save it is no big deal to do it even in disconnected scenario. > Take a look at OR mappers. Much of the plumbing is done automatically for > Also thought that it may reduce the amount of code required for updates, > inserts, deletes, and user concurrency. I need to have this major db app > up and running it less than two weeks, and I calculated that after I > create the data classes, data access classes, stored procedures, and > concurrency checking that I at least a few thousand lines of code to write > and debug... you (plus much more) As usual I recommend LLBLGenPro (www.llblgen.com) - you'll have all the code mentioned above in 5 minutes. -- Miha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ There are lots of scenarios where this is desirable (required) behavior.
There are a number of approaches including adding a timer that checks for unsaved changes and posts them (and returns server-side changes) and others. Some are built around server-side cursors so your cached row(s) are simply key pointers to the actual rows (using a few cached rows in memory). ADO.NET does not help in the latter case but it's possible to implement ANSI cursors in any application--managing them is up to you. -- Show quoteHide quote____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP INETA Speaker www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ Visit www.hitchhikerguides.net to get more information on my latest book: Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition) and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ----------------------------------------------------------------------------------------------------------------------- "Brooke" <tbroo***@hotmail.com> wrote in message news:OzBmr8VaHHA.1388@TK2MSFTNGP05.phx.gbl... >I guess that I am taking the lazy route. I would like to avoid counting on >the user to click "Save" after editing data on a form or datagrid. All of >our current apps save the record when you change rows. > > Also thought that it may reduce the amount of code required for updates, > inserts, deletes, and user concurrency. I need to have this major db app > up and running it less than two weeks, and I calculated that after I > create the data classes, data access classes, stored procedures, and > concurrency checking that I at least a few thousand lines of code to write > and debug... > > Thanks > > > "Miha Markic [MVP C#]" <miha at rthand com> wrote in message > news:5BF97572-A47C-4BA1-A89D-C069EF12E3F4@microsoft.com... >> What functionality are you looking for? >> >> -- >> Miha Markic [MVP C#, INETA Country Leader for Slovenia] >> RightHand .NET consulting & development www.rthand.com >> Blog: http://cs.rthand.com/blogs/blog_with_righthand/ >> >> "Brooke" <tbroo***@hotmail.com> wrote in message >> news:%23lyzvaTZHHA.3928@TK2MSFTNGP03.phx.gbl... >>>I would like to bind some datagrids to datasource and have them update >>>the database when a row is changed. I don't like the disconnected mode. >>>I am developing a Windows Form app, not an ASP.net app. >>> >>> Would like to have the same functionality as I did with VB6 and >>> Delphi.... >>> >>> Thanks >>> >> >> > >
Other interesting topics
Urgent Memory Leak Problem Using Type Dataset. Please help! :-(
Deployment + Vista Eliminating CRUD procedures Writing xml file from dataset different than the original Import text file with DATE column into MS Access Database with VB.NET or C# Datatable Is it possible to fill a DataSet.DataTable with values from more than one database table? Insert a whole datatable Some ADO.NET Mobile Advice please. Problem saving 24 hour date/time in SQL |
|||||||||||||||||||||||