DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 6 Aug 2007 12:56:25 +0100,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    ma
          2    Jesse Houwing
          3    William Vaughn
                 4    ma
                        5    William Vaughn
                        6    Cor Ligthert [MVP]
                        7    William Vaughn


newbie question   
Hello,

    I did some database programming in the past and I always used database 
controls which were offered by VB to connect to a database (Access 
database). One facility that offered by these controls and I like it most is 
the record locking. By record locking, I mean the capacity of locking a 
record so it is not edited by two or more user at the same time.

I found that this technology is no longer supported in .NET. Am I right?

If I am wrong, how can I use this control (or similar control) in C#?

If I am right, how I can develop an application that when a user is editing 
a record prevents others from editing the same record?



Regards
Date:Mon, 6 Aug 2007 12:56:25 +0100   Author:  

Re: newbie question   
Hello ma,


> Hello,
> 
> I did some database programming in the past and I always used
> database controls which were offered by VB to connect to a database
> (Access database). One facility that offered by these controls and I
> like it most is the record locking. By record locking, I mean the
> capacity of locking a record so it is not edited by two or more user
> at the same time.
> 
> I found that this technology is no longer supported in .NET. Am I
> right?


Right... This has been removed because of scalibilty issues with direct locking.


> If I am wrong, how can I use this control (or similar control) in C#?


You can still use the old controls through COM interop, but it's not reccommended.


> If I am right, how I can develop an application that when a user is
> editing a record prevents others from editing the same record?


It's not so much as preventing, but detecting the problem. If you add a TimeStamp 
column to your table, or check all the original values of the row and the 
one in the database upon update you can prevent users from overwriting eachothers 
changes. These two scenario's are directly supported by the ADO.NET design 
time tools. If you want to find out more, look in the MSDN Documentation 
for optimisitc and pessimistic locking.

Jesse
Date:Mon, 6 Aug 2007 12:27:28 +0000 (UTC)   Author:  

Re: newbie question   
Ma,
    Yes, you can still lock rows on the server if that's what you really 
need to do. However, as I describe in my book this can be problematic as it 
might lock out other users for an indefinite period of time. There are ways 
to manage "pessimistic" locks if you are careful. The technique uses a 
Transaction instance with the IsolationLevel set to RepeatableRead. 
Associated with a Command object, this locks the rowset returned by the 
CommandText until you execute the Commit method of the Transaction instance.

hth

-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
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)
-----------------------------------------------------------------------------------------------------------------------

"ma"  wrote in message 
news:evSTRDC2HHA.5992@TK2MSFTNGP02.phx.gbl...

> Hello,
>
>    I did some database programming in the past and I always used database 
> controls which were offered by VB to connect to a database (Access 
> database). One facility that offered by these controls and I like it most 
> is the record locking. By record locking, I mean the capacity of locking a 
> record so it is not edited by two or more user at the same time.
>
> I found that this technology is no longer supported in .NET. Am I right?
>
> If I am wrong, how can I use this control (or similar control) in C#?
>
> If I am right, how I can develop an application that when a user is 
> editing a record prevents others from editing the same record?
>
>
>
> Regards
>
> 
Date:Mon, 6 Aug 2007 08:46:50 -0700   Author:  

Re: newbie question   
Thanks Bill,
   Which book are you speaking about?

Regards

"William Vaughn"  wrote in message 
news:O$AnBEE2HHA.5772@TK2MSFTNGP02.phx.gbl...

> Ma,
>    Yes, you can still lock rows on the server if that's what you really 
> need to do. However, as I describe in my book this can be problematic as 
> it might lock out other users for an indefinite period of time. There are 
> ways to manage "pessimistic" locks if you are careful. The technique uses 
> a Transaction instance with the IsolationLevel set to RepeatableRead. 
> Associated with a Command object, this locks the rowset returned by the 
> CommandText until you execute the Commit method of the Transaction 
> instance.
>
> hth
>
> -- 
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant, Dad, Grandpa
> Microsoft MVP
> INETA Speaker
> www.betav.com
> www.betav.com/blog/billva
> 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)
> -----------------------------------------------------------------------------------------------------------------------
>
> "ma"  wrote in message 
> news:evSTRDC2HHA.5992@TK2MSFTNGP02.phx.gbl...
>> Hello,
>>
>>    I did some database programming in the past and I always used database 
>> controls which were offered by VB to connect to a database (Access 
>> database). One facility that offered by these controls and I like it most 
>> is the record locking. By record locking, I mean the capacity of locking 
>> a record so it is not edited by two or more user at the same time.
>>
>> I found that this technology is no longer supported in .NET. Am I right?
>>
>> If I am wrong, how can I use this control (or similar control) in C#?
>>
>> If I am right, how I can develop an application that when a user is 
>> editing a record prevents others from editing the same record?
>>
>>
>>
>> Regards
>>
>>
> 
Date:Tue, 7 Aug 2007 13:32:57 +0100   Author:  

Re: newbie question   
The latest is "Hitchhiker's Guide to Visual Studio and SQL Server (7th 
Edition)" (Addison Wesley).

hth

-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
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)
-----------------------------------------------------------------------------------------------------------------------

"ma"  wrote in message 
news:uFRrY8O2HHA.5796@TK2MSFTNGP05.phx.gbl...

> Thanks Bill,
>   Which book are you speaking about?
>
> Regards
>
> "William Vaughn"  wrote in message 
> news:O$AnBEE2HHA.5772@TK2MSFTNGP02.phx.gbl...
>> Ma,
>>    Yes, you can still lock rows on the server if that's what you really 
>> need to do. However, as I describe in my book this can be problematic as 
>> it might lock out other users for an indefinite period of time. There are 
>> ways to manage "pessimistic" locks if you are careful. The technique uses 
>> a Transaction instance with the IsolationLevel set to RepeatableRead. 
>> Associated with a Command object, this locks the rowset returned by the 
>> CommandText until you execute the Commit method of the Transaction 
>> instance.
>>
>> hth
>>
>> -- 
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant, Dad, Grandpa
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com
>> www.betav.com/blog/billva
>> 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)
>> -----------------------------------------------------------------------------------------------------------------------
>>
>> "ma"  wrote in message 
>> news:evSTRDC2HHA.5992@TK2MSFTNGP02.phx.gbl...
>>> Hello,
>>>
>>>    I did some database programming in the past and I always used 
>>> database controls which were offered by VB to connect to a database 
>>> (Access database). One facility that offered by these controls and I 
>>> like it most is the record locking. By record locking, I mean the 
>>> capacity of locking a record so it is not edited by two or more user at 
>>> the same time.
>>>
>>> I found that this technology is no longer supported in .NET. Am I right?
>>>
>>> If I am wrong, how can I use this control (or similar control) in C#?
>>>
>>> If I am right, how I can develop an application that when a user is 
>>> editing a record prevents others from editing the same record?
>>>
>>>
>>>
>>> Regards
>>>
>>>
>>
>
> 
Date:Tue, 7 Aug 2007 09:57:47 -0700   Author:  

Re: newbie question   
ma,

In my opinion is it the best book for Newbie's for ADONET and SQL Server I 
have seen so far, it is not theoretical, but focused on practical use.

(I don't get any fee from Bill)

:-)

Cor

"ma"  schreef in bericht 
news:uFRrY8O2HHA.5796@TK2MSFTNGP05.phx.gbl...

> Thanks Bill,
>   Which book are you speaking about?
>
> Regards
>
> "William Vaughn"  wrote in message 
> news:O$AnBEE2HHA.5772@TK2MSFTNGP02.phx.gbl...
>> Ma,
>>    Yes, you can still lock rows on the server if that's what you really 
>> need to do. However, as I describe in my book this can be problematic as 
>> it might lock out other users for an indefinite period of time. There are 
>> ways to manage "pessimistic" locks if you are careful. The technique uses 
>> a Transaction instance with the IsolationLevel set to RepeatableRead. 
>> Associated with a Command object, this locks the rowset returned by the 
>> CommandText until you execute the Commit method of the Transaction 
>> instance.
>>
>> hth
>>
>> -- 
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant, Dad, Grandpa
>> Microsoft MVP
>> INETA Speaker
>> www.betav.com
>> www.betav.com/blog/billva
>> 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)
>> -----------------------------------------------------------------------------------------------------------------------
>>
>> "ma"  wrote in message 
>> news:evSTRDC2HHA.5992@TK2MSFTNGP02.phx.gbl...
>>> Hello,
>>>
>>>    I did some database programming in the past and I always used 
>>> database controls which were offered by VB to connect to a database 
>>> (Access database). One facility that offered by these controls and I 
>>> like it most is the record locking. By record locking, I mean the 
>>> capacity of locking a record so it is not edited by two or more user at 
>>> the same time.
>>>
>>> I found that this technology is no longer supported in .NET. Am I right?
>>>
>>> If I am wrong, how can I use this control (or similar control) in C#?
>>>
>>> If I am right, how I can develop an application that when a user is 
>>> editing a record prevents others from editing the same record?
>>>
>>>
>>>
>>> Regards
>>>
>>>
>>
>
> 
Date:Wed, 8 Aug 2007 12:50:53 +0200   Author:  

Re: newbie question   
Thanks Cor.
I'll let your kids go now... ;)

-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
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)
-----------------------------------------------------------------------------------------------------------------------

"Cor Ligthert [MVP]"  wrote in message 
news:%23Qq42na2HHA.728@TK2MSFTNGP05.phx.gbl...

> ma,
>
> In my opinion is it the best book for Newbie's for ADONET and SQL Server I 
> have seen so far, it is not theoretical, but focused on practical use.
>
> (I don't get any fee from Bill)
>
> :-)
>
> Cor
>
> "ma"  schreef in bericht 
> news:uFRrY8O2HHA.5796@TK2MSFTNGP05.phx.gbl...
>> Thanks Bill,
>>   Which book are you speaking about?
>>
>> Regards
>>
>> "William Vaughn"  wrote in message 
>> news:O$AnBEE2HHA.5772@TK2MSFTNGP02.phx.gbl...
>>> Ma,
>>>    Yes, you can still lock rows on the server if that's what you really 
>>> need to do. However, as I describe in my book this can be problematic as 
>>> it might lock out other users for an indefinite period of time. There 
>>> are ways to manage "pessimistic" locks if you are careful. The technique 
>>> uses a Transaction instance with the IsolationLevel set to 
>>> RepeatableRead. Associated with a Command object, this locks the rowset 
>>> returned by the CommandText until you execute the Commit method of the 
>>> Transaction instance.
>>>
>>> hth
>>>
>>> -- 
>>> ____________________________________
>>> William (Bill) Vaughn
>>> Author, Mentor, Consultant, Dad, Grandpa
>>> Microsoft MVP
>>> INETA Speaker
>>> www.betav.com
>>> www.betav.com/blog/billva
>>> 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)
>>> -----------------------------------------------------------------------------------------------------------------------
>>>
>>> "ma"  wrote in message 
>>> news:evSTRDC2HHA.5992@TK2MSFTNGP02.phx.gbl...
>>>> Hello,
>>>>
>>>>    I did some database programming in the past and I always used 
>>>> database controls which were offered by VB to connect to a database 
>>>> (Access database). One facility that offered by these controls and I 
>>>> like it most is the record locking. By record locking, I mean the 
>>>> capacity of locking a record so it is not edited by two or more user at 
>>>> the same time.
>>>>
>>>> I found that this technology is no longer supported in .NET. Am I 
>>>> right?
>>>>
>>>> If I am wrong, how can I use this control (or similar control) in C#?
>>>>
>>>> If I am right, how I can develop an application that when a user is 
>>>> editing a record prevents others from editing the same record?
>>>>
>>>>
>>>>
>>>> Regards
>>>>
>>>>
>>>
>>
>>
>
> 
Date:Wed, 8 Aug 2007 15:12:35 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us