Home All Groups Group Topic Archive Search About

How can I use connected mode instead of disconnected?

Author
13 Mar 2007 6:13 AM
Brooke
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

Author
13 Mar 2007 12:34 PM
Scott M.
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
>
Are all your drivers up to date? click for free checkup

Author
17 Mar 2007 1:38 PM
Miha Markic [MVP C#]
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/

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
>
Author
18 Mar 2007 1:13 PM
Brooke
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
>>
>
>
Author
18 Mar 2007 2:09 PM
Miha Markic [MVP C#]
"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.

I don't think this approach works for any serious application for many
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.

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

Take a look at OR mappers. Much of the plumbing is done automatically for
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/
Author
18 Mar 2007 6:46 PM
William (Bill) Vaughn
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.

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

Show quoteHide quote
"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
>>>
>>
>>
>
>

Bookmark and Share