Home » SQL Server

Fix for the SQL Error 16943

One of my program in VC++ uses the MS SQL Server 2000 as the DB and the app was coded in VC++ 6.0. The DB part was governed by the MFCs CRecordset and so on. The data is populated through the sequence as follows

1. CRecordset::AddNew();

2. Fill all the columnar data of the record

3. CRecordset::Update()

The problem now surfaces is, when the app running if the Optimization Job is done then the 3rd step throws the following SQL Error(By SQL Profiler) 

Msg 16943, Level 16, State 4
Could not complete cursor operation because the table schema changed after the cursor was declared.

Please help me out in fixing this. Thanks in advance. :)


2 Answers Found


Answer 2

Thanks Dimant,

But Aaron dealt with the fix  in the SQL part but as I mentioned earlier its with MFC classes.

Please also note that I am not using any Stored Procedures or any Cursors anywhere and all through the program.



I am fairly new at SQL Server so I appreciate any help. I had SQL Server 2005 Express installed but needed the enterprise edition for reporting purposes. I have several other servers I have to connect to and the version I had did not allow me to connect.

I am now unable to connect to the server. I have 3 servers listed in the drop down but none work. I have looked through all the forums for an answer. I found several but they require me to go to the SQL Surface Area Configuration. Unfortunately that option does not come up for me when I go the Start>Programs>SQL Server 2008> Configuration Tools.

I found several forums that stated that I need to verify the instance name and/or change it. I am unable to do that since I am unable to connect to the Surface Area Configuration.

Here is the exact error I am receiving:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)


2007 BCM cannot access database, SQL detected torn page (expected signature: 0x555555; actual signature; 0xaaaaaa9).
I understand that indexs when rebuilt should show less fragmentation.

In AW, Before and after I rebuild all indexes, index freagmentation show the same results as follows


Employee AK_Employee_LoginID 66


Am I missing something



I am getting the error:


Error 6 Cannot implicitly convert type 'string' to 'System.Windows.Forms.DataGridViewTextBoxColumn'


this was because I had named the winform "MainForm"

So, I change the name to "frmMainForm"

I then clean and rebuild.

Same error, even though the name is no longer a keyword.

Any ideas?




Hi Everybody,

I am getting the following error message while connecting to my MOSS development machine. I am using a Virtual Machine based MOSS installation.

Network Error (tcp_error)

A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

For assistance, contact your network support team.

Please help me to resolve this issue.



The current environment:

SQL server 2005 hosted on clustered environment with Active and Passive nodes. We started with passive node. Ran the upgrade advisor; found no issues. Proceeded with in-place upgrade. Upgrade completed with no issues. We rolled the cluster. SQL server service failed to start.

Got following error

Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 33009, state 2, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

For more information, see Help and Support Center at _http://go.microsoft.com/fwlink/events.asp.

When searched on this forum, I got following article that pretty much ran to in to the same problem that we encountered.


Ran following commandfollowing command to start SQL Server and to bypass any upgrade scripts:

net start mssqlserver /f /T3608

Based on following article -http://support.microsoft.com/default.aspx/kb/960781, tried to login to SQL using the 'admin-only' connection from Management Studio and from command prompt from the serveritself.


Got error saying DAC needed to be enabled.

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn>sqlcmd -A -

d master

HResult 0x274D, Level 16, State 1

SQL Network Interfaces: Could not establish dedicated administrator connection (

DAC) on default port. Make sure that DAC is enabled [10061].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn>

Searching through MSDN again, found that DAC on cluster is by default off. On cluster configurations, the DAC will be off by default. Users can execute the remote admin connection option of sp_configure to enable the DAC listener to access a remote connection. But , can not run the SP since I am not able to log in.

I would like toknow how toenable DAC on SQL server 2008.


Hi Experts, could you tell me Regular expression for a fixed word followed by fixed number of digits

Eg "TY23232" , "TY84949"  


TY followed by fixed 5 digits


Thanks in advance,


I am getting an error with code 00001 59204 in Quickbooks every time I click on a support link.  The Quickbooks support rep ran a system scan and found corrupted files and said I need to fix .net framework 2.0 and 3.5.  How do I fix .net framework 2.0 and 3.5?
I was having problems getting things to work... so I changed the password to the special user account "trade".  Since the actual password is encripted in the web config file... what is the default???  I tried yyy and it doesn't work.  I have done a lot of work so I don't want to uninstall and reinstall everything just to get the password back.


Has there been a fix for this yet?  This is the binding order issue...apparently a known bug?



  I have been trying to get the SQL Server 2005 Service Pack 3  update fix. I have downloaded it, but there is an error that pops up. ( WindowsUpdate_0000737D" "WindowsUpdate_dt000" ). I have went threw that help window to fix this. When i get to the step 5 there are two pick. 1 is mssmlbiz:Database Engine. 2 is SQLEXPRESS:Database Engine. I have choose both of them. one at a time and then i get to the step 7 and this is where i hit a wall. I do not have an opption button for next. Thank You.   



I want to install SQL 2008 client tools on a Win 2008 machine.

The machine already contains an instance of SQL 2005 Express which I don't want to unistall.

The problem is that the installation wizard complains about Consistency Validation for SQL registry keys.

The log shows the following:

2010-08-26 10:14:46 Slp: Could not fix registry key HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\Client\ConnectTo.
2010-08-26 10:14:46 Slp: System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
2010-08-26 10:14:46 Slp:    en Microsoft.SqlServer.Configuration.FixSqlRegistryKey.Program.ContainsInheritedAce(Byte[] securityDescriptor)
2010-08-26 10:14:46 Slp:    en Microsoft.SqlServer.Configuration.FixSqlRegistryKey.Program.FixRegistryKey(String keyName)
2010-08-26 10:14:46 Slp:    en Microsoft.SqlServer.Configuration.FixSqlRegistryKey.Program.FixRegistryKeyAndSubKeys(RegistryKey key)

I have created the "ConnecTo" key, which didn't even exist.

I have also tried to set premissions to HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer to "Everyone/Full Control" but the installation fails over and over.

Is there anything else I could try to get the SQL tools installed?

Thanks in advance.


 Hi all

I Installed SQL Server 2008 R2 and it is side by side with SQL Server 2005 (64bit)

Here my version

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2) Hypervisor).

I am able to create Jobs and able to modify the Jobs with out appling any hotfix.

old post which is recomended to applu hotfix


1. Why my server not given  gives error while creating /modifing Job ?

2.From  wizard/mantenancePlans  Iam creating Jobs it is correct test.

2.Is it because of SQL Server 2005


Please some suggest me..why I am not getting error

Thaanks a lot



Im trying to import fixed length files to sql. data in it s not importing correct im getting the values incorrect.

it takes the rowdelimiter as also an character and calculating it wrongly. here s my code. if u can plz give some alternate sample code



void CreateSourceColumns()



// get the actuall connection manger instance


IDTSConnectionManagerFlatFile90 flatFileConnection =


as RuntimeWrapper.IDTSConnectionManagerFlatFile90;

flatFileConnection.DataRowsToSkip = delimitedDataSource.SkipRows;


IDTSConnectionManagerFlatFileColumn90 column;


IDTSName90 name;


// trace the current count




DataTable schemaTable = DataSource.GetSchemaTable(); // get the schema table

flatFileConnection.TextQualifier =



foreach (DataRow row in schemaTable.Rows)


// iterate


string colName = row["ColumnName"] asstring; // get the col name


// now create a new column for the connection manager

column = flatFileConnection.Columns.Add();

// if this is the last row


if (schemaTable.Rows.IndexOf(row) == (schemaTable.Rows.Count - 1))


//column.ColumnDelimiter = delimitedDataSource.HeaderRowDelimiter;

column.ColumnDelimiter = delimitedDataSource.RowDelimiter;


//column.ColumnDelimiter = ";";


// add the row delimiter



column.ColumnDelimiter = delimitedDataSource.Delimiter;

column.TextQualified = delimitedDataSource.TextQualifier !=



if (delimitedDataSource.FileType == "10")


column.ColumnType =


column.ColumnWidth = 4;

//need to get the correct width

column.MaximumWidth = 4;

//need to get the correct max width






column.ColumnType =




//column.ColumnDelimiter = "TabDelimited";



column.TextQualified =



column.DataType = RuntimeWrapper.

DataType.DT_WSTR; // Apparently I am giving this..I need to do Rnd no this for clear idea

column.DataPrecision = 0;

column.DataScale = 0;

name = (RuntimeWrapper.


name.Name = colName;




Hello all

Please some body help me to  find Hot fixes  for Windows 2003 SP2 to install SQL Server 2008 R2 In Cluster environment.




Thanks in Advance  



I have 2 virtual machines running Windows 2008 R2 Standard.


Machine A has SQL Server 2005 installed and updated.

Machine B has SQL server 2008 R2 installed and updated.

The host is Windows 2008 R2 Standard and has SQL Express.

Machine A and B are able to see and list all sql server instances on the network. Such as machine A is able to see the SQL server instance from machine B and the SQL Express instance from the host.

The problem is the Host OS can't see the SQL Server instances on the network from any machine. It can connect to them, but it doesn't list them. I have tried with all firewalls off as well, but it's a no go. I tried to list the network servers on the host through SQL Management studio, "sqlcmd.exe -L", and osql.exe -L, but it always comes back empty. Does anybody know what the issue might be? I'm tearing the rogue strands of hair on my bald head over this.



I understand that the defect KB#2455009 has been fixed in SQL Server 2005 SP3 and released as part of CU#13 on January 2011. Is there a plan to fix the issue in SQL Server 2005 SP4? If so, what would be the expected release date of the fix?




Our build machine has VS 2010 & TFS 2010. When I try to kick off a build from my local machine which is running VS 2008 I get the error which is below.

Build started 6/23/2010 11:19:29 AM.
Project "C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj" on node 1 (EndToEndIteration target(s)).
  GetBuildProperties TeamFoundationServerUrl="http://server:8080/tfs/DefaultCollection" BuildUri="vstfs:///Build/Build/1503"
  UpdateBuildNumberDropLocation TeamFoundationServerUrl="http://server:8080/tfs/DefaultCollection" BuildUri="vstfs:///Build/Build/1503" BuildNumber="v_2_2_20100623.8" DropLocation="\\server\Builds\Branch_2_2\v_2_2\v_2_2_20100623.8"
  DeleteWorkspaceTask TeamFoundationServerUrl="http://server:8080/tfs/DefaultCollection" BuildUri="vstfs:///Build/Build/1503" Name="TI_46_3" DeleteLocalItems=True
  TF14061: The workspace TI_46_3;domain\username1 does not exist.
  CreateWorkspaceTask TeamFoundationServerUrl="http://server:8080/tfs/DefaultCollection" BuildUri="vstfs:///Build/Build/1503" Name="TI_46_3" BuildDirectory="C:\Builds\3\Branch_Version_2_2\v_2_2" SourcesDirectory="C:\Builds\3\Branch_Version_2_2\v_2_2\Sources" Comment="Workspace created by Team Build"
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5,801,5): error : The working folder C:\Builds\3\Branch_Version_2_2\v_2_2\Sources is already in use by the workspace TI_46_3;domain\username_2 on computer server. [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly. [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.WorkingFolderInUseException: The working folder C:\Builds\3\Branch_Version_2_2\v_2_2\Sources is already in use by the workspace TI_46_3;;domain\username_2 on computer server---> System.Web.Services.Protocols.SoapException: The working folder C:\Builds\3\Branch_Version_2_2\v_2_2\Sources is already in use by the workspace TI_46_3;;domain\username_2 on computer server. [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    --- End of inner exception stack trace --- [C:\Builds\3\Branch_Version_2_2\Cv_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout) [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions) [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Tasks.WorkflowTask.ExecuteInternal() [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Tasks.Task.Execute() [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(801,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) [C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj]
Done Building Project "C:\Builds\3\Branch_Version_2_2\v_2_2\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.



I thought I would be able to clear this problem up using the following command.

tf workspace /delete [TI_46_3];[domain\username1] /server:[http://server]

This command is unsuccessful with the following error.

TF30076: The server name [http://server] provided does not correspond to a server URI that can be found. Confirm that the server name is correct.

I seem to be stuck any help would be appreciated.





Vista Professional up to date 


regasm.exe - .NET Framework Initialization Error
C:\Windows\Microsoft.NET\Framework\v4.0.20506\mscoreei.dll could not be loaded

In addition, a number of other programs popped up the same error suggesting a re-installation of their particular executable.

It seemes to me that the mscoreei.dll file is corrupted????  If so, where can I get a good file?


regsvr32 "C:\Windows\Microsoft.NET\Framework\v4.0.20506\mscoreei.dll"

Then got another "... failed to load ... could not be found..." error even though "mscoreei.dll" is in the directory

What is wrong and how to fix?


I setup a local web application on a WinXP SP3 machine, when I run a report I get an error below. The same code if run from an IIS server will work without error. So I think i missed to install or register a component in my local machine. Does anybody encounter this issue, do you have any solution?

<Exception ExceptionType="System.IndexOutOfRangeException" Message="System error: -2146828279." Data="System.Collections.ListDictionaryInternal" TargetSite="Void parse(System.Object)" Source="msxml3.dll"><StackTrace>   at MSXML2.SAXXMLReaderClass.parse(Object varInput)   at xxx...Web.Reports.Generate.Page_Load(Object sender, EventArgs e) in C:\....\generate.aspx.cs:line 121</StackTrace></Exception>


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure