DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Mark Guest

    Delete and Select Statements


    Hi,

    I am running two VB Applications. One is used for Updating and Deleting
    data from the database while the other is like a search engine that would
    search for specific data. Right now, when we have the Updating applcation
    running, it takes a long time even timing out for the search engine to retrieve
    data from teh database because the Update application locks the tables.
    Now is there a way to only lock specific records. For example if I am deleting
    or updating records that are in group A, only lock the records that belong
    to group A and leave teh rest unlock. Thanks in advance.



  2. #2
    Mark Guest

    Re: Delete and Select Statements


    "Mark" <mthead28@hotmail.com> wrote:
    >
    >Hi,
    >
    >I am running two VB Applications. One is used for Updating and Deleting
    >data from the database while the other is like a search engine that would
    >search for specific data. Right now, when we have the Updating applcation
    >running, it takes a long time even timing out for the search engine to retrieve
    >data from teh database because the Update application locks the tables.


    >Now is there a way to only lock specific records. For example if I am deleting
    >or updating records that are in group A, only lock the records that belong
    >to group A and leave teh rest unlock. Thanks in advance.
    >
    >

    Hi,
    You can use the locking of of SQL statements. I am referring to MSSQL
    server options.

    Eg. Update Table with (rowlock) set Filed1 = 'Field Update'

    There are different locking options available. You can refer to Help.

    Since You are using the application in VB. The ADO object also have different
    locking options when you execute the sql statements. You can try them. Similarly
    You can use the cursor types of ADO object.

    Hope these tips will help you.

    Sobha.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links