Results 1 to 5 of 5

Thread: doubt in sql cache dependency

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    doubt in sql cache dependency

    Hi,

    I have read some atricles on Hoe sql cache dependency works.actually what i have under stood is as follows:

    when we create sqldependency for table properly,once any changes occurs in that table will be automatically pushed to front end.so that we need not to hit the database again and again to fetch latest records.

    i would like to know whether my understading on sql cache dependency is correct ot not. please correct me if i am wrong.

    i would like to know the drawbacks of sql cache dependency. please
    Loving dotnet

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: doubt in sql cache dependency

    There's no automatic pushing to the front end. The changed data is simply removed from the cache so that the next time that data is requested it will be retrieved from the database again instead of from the cache.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: doubt in sql cache dependency

    hi Jmcillhinney,

    thanks for the reply. waht i mean the automatic front end means let us take
    an example.

    i have created the sqldependency for one table.so first time when my form loads i ahave the data in the cache, so i could load and show it in the gridview. then am inserting the data in the table. at that time will the new inserted data available in the cache. so that i could refer my datasource to show latest records in the gridview. please
    Loving dotnet

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: doubt in sql cache dependency

    When your app runs the first time the cache is empty, so the first request for data will have to retrieve it from the database. Subsequent requests will use the data from cache so no database access is required. When data changes it is removed from the cache so, the next time that data is requested, it will be retrieved from the database. Subsequent requests will use the data from the cache again, until the data changes again and gets removed from the cache again.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    Re: doubt in sql cache dependency

    so you mean that when any changes occurs in the databse , the cache would be cleared and it hits the database for the new records to keep in the catch. is it so? pelase
    Loving dotnet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width