.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid
Post New Web Links

Resetting Change Tracking Version

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :Sql Server

Hello, Is there a way in which we can reset the current version? When we disable Change Tracking at table and DB level current version function returns NULL, but on turning it back on it gives back the last number. Is there a way to reset it back to zero? Thanks in advance!!!

<br/> SELECT CHANGE_TRACKING_CURRENT_VERSION() is the function in context

View Complete Post

More Related Resource Links

SQL Server Compact loses change tracking anchors when copied to device

I have a device app that use SQL Compact and uses sync framework to synchronize to a SQL Server 2008 instance.  In order to speed up the initial synchronization of my device app, I'm creating the database (.sdf) using the sync framework on the server based on the suggestion in this article: http://msdn.microsoft.com/en-us/library/dd938879.aspx#HandlingInitialSynchronizationandExpiredSubscriptions Then I get it via a WCF service down to the device app.  I'm able to download the db and it has data.  When I sync however, the database doesn't seem to think it is syncronized.  It seems to have lost it's anchors.   The following code returns an anchor for my State table on the server, but not after copying it to the device. Any suggestions are appreciated.  Thanks FPASQLCeClientSyncProvider).GetTableReceivedAnchor("State")


A question on the behaviour of the SYS_CHANGE_CONTEXT in relation to Change Tracking... Our overall application is to facilitate mobile clients connecting to a central server => SQL Server Change Tracking provides a great set of services in this area. However, ideally we want to prevent a client's own changes being reflected back to itself and had hoped to use the "With Change Context" facility to achieve this. One scenario + associated behaviour we've seen during prototyping is as below: - client has successfully sync'ed ... - server makes an update to a given Row with context SERVER - client then applies an update to a different column in the same Row with context CLIENT-<n> ... - client (CLIENT-<n>) seeks to retrieve its updates since the last successful sync.   At this point, while the <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-alt:"Calisto MT"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Century Gothic"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNor

Controlling Change Tracking in SQL CE 3.5 sp1

Hi,This question kinda spans two technologies - Sync Framework and SQL CE 3.5 - but I thought it pertinent to ask it here.I've found that Sync Framework turns on and uses Change Tracking in the client database (SQL CE 3.5 sp1).As a bit of a background to the question, I have a scenario in which I need to prepare an initial database for each client (PDA application using SQL CE) preloaded with data, and give the central admin the ability to refresh this "initial database" periodically for new users. In this scenario, I need to be able to update the Change Tracking anchors.I can't seem to find any documentation on how to control change tracking in SQL CE 3.5, or how to update the system tables. Sync Framework manages to do this, so there must be DML commands available. The commands available for SQL 2008 (/express) don't seem to work with SQL CE.Does anyone have any documentation on this, or know what the relevant commands are?Many thanks in advance.

vb.net - change version information

I'm using .net 2005 I would like to edit the Version Information of File Version,Description,Copyright,Company, Product Version Can i able to do it? where and how to set up ?    

Web Service .Net version change V2 to 3.5 Generates CS0234 Error



I have just started work on a stable web service project that was written entirely in .Net V2.

Recent modifications have required that I change it to use LINQ Entity based business layer which required me to up the .Net version to 3.5 to match that of the dependancy. The project compiles fine but when I run the project it falls over at any reference to the actual service code.

It currently falls over when processing the web.config file on the line:

		<profile defaultProvider="AspNetSqlProfileProvider" enabled="true" inherits="MCM.MCMWebService.PurchaseOrderWS.Helper_Classes.UserProfile">

which declares where I have a code based override of the profile provider. If I comment this line out it then falls over when running Global.asax so the comm

Change document version number via database


Hi all,

I was blocked by an issue of document version number. The customer wants to move a document from one document library to another. After the document is moved, version number should be kept the same and metadata values of each version should also be kept.

File.MoveTo(string newUrl) method can move file and keep the same version number but lose the metadata in previous versions. Only the latest version has metadata values. Also this method cannot move file cross site collections.


Following is my solution:

1. Upload all the versions along with metadata to the new location and then delete the old file.

2. Update document version number in database directly.

Finally the solution works well, but I don't know if step2 will impact any other default logic in SharePoint system. Below is the logic to update version number.

            SqlConnection cn = new SqlConnection(connStr);
            SqlCommand cmd;
            string cmdTxt;


            cmd = cn.CreateCommand();

can i change atrial version of SQL 2008 Srv to a licensed version if we have the keys.


now i have aSQL 2008 srv trial version i want to change it to a licensed version by using the command line tool or by other simle technique .i dont want to go for a fresh installation or upgrade.is it possible to do this.i have the license keys with me.

Resetting user Password and setting User Must Change Password at next Logon with ASPX


Hi All,

I am having an issue with an asp.net project that I am doing and have been struggling with it for a while now and was hoping someone here might be able to help me out.

Basically what we are doing is resetting peoples passwords via a web page. I have got it to the point that it is resetting the users password but is not setting User Must Change Password at Next Logon in AD. Just so that I can save you time asking the lstOffice.Text in the Connection String is so that our Admin can select the office that the users profile is present in on the AD. 

The code is shown below (connection strings and users/passwords have been changed):

 Sub SetPassword()

        Dim de As New DirectoryEntry("LDAP://IP:389/ou=Layer1" + ", " + "ou =" + lstOffice.Text + ", " + "ou=Layer3,DC=1,DC=2,DC=com,DC=au")
        'authent for AD 
        de.AuthenticationType = AuthenticationTypes.Secure
        de.Username = "ADMIN"
        de.Password = "NotTh3realpassword"

            ' new directory searcher
            Dim ds As New DirectorySearcher(de)

            Dim mySearchResultColl As SearchResultCollection

            Dim mySearchResult As SearchResult
            '  ds.Filter = ("sAMAccountname = " + name)

Problem when change to a new AjaxControlToolkit version.


Hello, I have a problem with a newer version of ajaxcontroltoolkit.dll. In my page I have the version 1.0.1119.0 and I change it for a newer version the 3.5 to add some new features to my page. I’m using visual studio 2010. Now the huge problem I have is that I can’t fire the server side code with a control (button, gridview, etc..). I click a button and nothing happen. In my page a have a 2 update panels with the update mode set as always. I added the buttons to the AsyncPostbackTriggers, change the asp:ScriptManager with the ToolKitScriptManager and I have the same problem. The entire problem begins when I add the new version of the ajaxcontroltoolkit.

How can I solve this?


Sharepoint version change




We started using MOSS 2007 version  but it now has upgraded to MOSS 2007 version This upgrade in the version could have happened three months ago.


Is there any way to check when this version changed by using any command or tool.Hoping for an answer from the experts at the earliest.




How to change .Net framework version without restarting W3SVC service in IIS?

In this short article I will explain how to change the .net framework version in the IIS for the specific application without restarting W3SC services.

ASP.NET 4.0: WebForm Routing (quick n dirty version)

One of the things we're adding in ASP.NET 4.0 is built-in support for using Routing together with WebForms. Now, I'm totally aware that this is possible to do already and that a number of people have posted ways of doing this with the Web Routing feature which shipped with ASP.NET 3.5 SP1. We're just adding some features to make it easier to do

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



SqlDataSource how to change the stored procedures at run time



Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend