2 SQL CE Native Error Codes (28037 And 28600) Freezing Up My Windows CE .Net Application???
Jan 8, 2008
I am running a .Net application (VB.Net, .Net Framework 2.0) on a Windows CE 5.0 handheld device. I am relatively having good success with SQL CE replication, however sometimes (2 users out of 30 every 2 weeks), are freezing up in the application.
Here is what CE SQl software versions I installed:
sqlce30.dev.ENU.wce5.armv4i.CAB
sqlce30.repl.wce5.armv4i.CAB
sqlce30.wce5.armv4i.CAB
I have a trace log in my application, and here is what pops up before the hang (warm rebooting the handheld works)
NativeError: 28037
SQL Msg: A request to send data to the computer running IIS has failed. For more information, see HRESULT.
NativeError: 28600
SQL Msg: The database is currently synchronizing with the server.
I am using a Thread to syncronize (microsofts built in class), as you can see I am well aware of 28600, it just means some other thread is already syncing, so I can wait until next time to syncronize. However, my users apps are freezing just after both error codes occur. Anything in the code below causing issues??? (maybe _repl.Dispose() is freezing up my handheld, because its freezing after this line of code (see below code):
"MTM.SPUD.Utilities.Utilities.Log("[DEBUGQLThread#" + threadId + "]: End of Thread Life.")"
Public Sub AsyncSyncronize(ByRef PendingData As Boolean, ByVal Publication As String, ByVal Subscription As String, ByRef LastSyncDateTime As DateTime)
Dim _repl As New SqlCeReplication()
Try
...
savedAsyncResult = _repl.BeginSynchronize(objDelegate1, objDelegate2, objDelegate3, objDelegate4, _repl)
Catch ex As Exception
Finally
End Try
End Sub
Public Sub OnSynchronizeComplete(ByVal asyncResult As IAsyncResult)
Dim _repl As SqlCeReplication = Nothing
Dim threadId As String = ""
Try
_repl = DirectCast(asyncResult.AsyncState, SqlCeReplication)
threadId = _repl.InternetPassword
_repl.EndSynchronize(asyncResult)
dataIsPending = False
dataIsPending = True
If exce.NativeError.ToString = "28600" Then
MTM.SPUD.Utilities.Utilities.Log("[WARNINGQLThread#" + threadId + "]: Will try again next time")
Return
End If
Catch ex As Exception
Return
'MTM.SPUD.Utilities.Utilities.Log("App Exception: " + ex.Message)
'Throw New Exception("EndSynchronize Failed: " + ex.Message)
Finally
MTM.SPUD.Utilities.Utilities.Log("[DEBUGQLThread#" + threadId + "]: End of Thread Life.")
If _repl IsNot Nothing Then
_repl.Dispose()
_repl = Nothing
End If
End Try
End Sub
I currently have a Vs.Net 2003 Pocket PC application that uses sql server ce 2.0 to push and pull data from Sql Server 2000 to the Pocket PC. The sscesa20.dll isapi agent is installed on a Windows 2000 server and points to another server that hosts the SQL database. In this configuration everything works like a charm. I am in the process of upgrading my application server to Windows 2003 Server but the RDA PULL process does not work, giving an Native Error of 28035 EVERY time. I use the exact same code in the app but when I point to the isapi agent on the 2003 box it does not work. When I connect to the the sscesa20.dll via the Pocket IE it returns the "Sql Server CE Server Agent" message. When I do an RDA.Submit it works and the SQL table is updated as expected.
I have configured IIS 6 with the proper web extensions I have turned off the firewall and antivirus on the server. I have reinstalled the server agent several times. I set up the sscesa20.dll manually. I removed all file level security. I opened up the virtual directory. I verified the ddl versions match.
I'm dead in the water right now. I'm not sure what else to try.
I'm facing a problem when sychronization data between pocket PC and database server.It shows error "A request to send data to the computer running IIS has failed".How can I fix? I'm using Pocket PC 2003 emulator. I can access replication internet url by pocket IE. I also open port for HTTP and HTTPS both.
I am modifying the aplication to visual.net from visual studio 2005 but I have problems ( in this moment i working in my pc , with sql 2000 personal ,windows xp , sql mobile and pc pocket emulator for window ce 5.0)
I don't know but i can't make the Pull in the server.
1) the http://localhost/driver2005/sqlcesa30.dll?diag is correct
2) I don't have the windows firewall
3)the anonimous user have all the permition in the virtual directory..
i have recently started to work with the analysis services and i am having some problems.
i have made a web application that for now just tries to connect to an analysis server.
The server is installed on an xp sp 2 system.
for testing, i used my local computer, which is running also win xp sp2. After deploying, the application can connect to the AS server on the other machine. the problem occurs when i try to deploy the applicatuion on the production server, which is running win 2k3 server on 32 bit. When deploying, i use the same connection string, so it should try to connect to the AS server installed on a win xp sp2 system.
The first thing that came to my mind was to check the MDAC versions, be cause of the message: "Provider cannot be found. It may not be properly installed."
on my computer, where the application worked ok, the version is MDAC 2.8 SP 1 Windows XP SP 2
on the win2k3 server, the MDAC version is : MDAC 2.8 SP2.... i thought it was the version of the service pack, so o searched for the update of MDAC 2.8 SP1, trying to install mdac 2.8 sp2 to see if i was to see the same error, but i found that mdac 2.8 sp2 is only for win2k3 server, and for win xp is mdac 2.8 sp1, according to this link: http://support.microsoft.com/default.aspx/kb/884103
Now i got confused and have no clues how to make this work...
I am currently modifying an existing application (which uses OLE DB Consumer Templates to access a remote SQL db) to utilize SQL Native Client instead. Does anyone have any experience making this change? Am I correct in my assumption that all I have to do is: change my included headers from 'sqloledb.h' to 'sqlncli.h' and change CLSID_SQLOLEDB to CLSID_SQLNCLI? I am still including the 'atldbcli.h' header and therefore still using the OLE DB Consumer Templates. Can I continue to use the Consumer Templates along with SQL Native Client?
I am attempting to write a Windows service that watches a database for uploaded files to import. When a new file is found, the corresponding SSIS package is run from the file system with variables passed through. I started development as a Windows app and copied the functionality to a service.
The app runs fine. The service does not. I get a "Failure" each time a package is executed. Everything is identical behind the scenes with the obvious exceptions that OnStart and OnStop handlers are buttons in the app. I added a script task at the beginning of one of the SSIS packages to notify me that it is even running at all. It doesn't even hit that initial task.
Again, the app will run all packages just fine. The data is imported and the results return as "Success."
The following is the code executing the package. Any help is appreciated. I've been banging my head on this one for a few days now. (Is there a tag to format a code sample?)
Dim pkgLocation As String Dim pkg As New Package Dim app As New Application Dim pkgResults As DTSExecResult
I have another question about ADO (using C++). I have searched the MSDN but I haven't found a answer to my question (maybe I'm just too stupid)... If I make a connection to my SQL Server there may occur some errors, but how to find out what went wrong ?
In terms of code I have e.g. something like that: try { connection->Open(ConnectionString,Username,Password,ADODB::adConnectUnspecified); ...} catch (_com_error& e) { long numErrors = connection->Errors->Count; for (long i=0; i<numErrors; i++) { ADODB::ErrorPtr pErr = connection->Errors->GetItem(i); ..... }}
Now I could get the error number by pErr->GetNumber(). But with which symbolic constant has this to be compared to find out which error occured ?? I didn't find any...Or is there another better way to do this ?
Using the following syntax, sometimes non-zero error codes are returned: D:SQL Server x86Servers>start /wait setup D:SQL Server x86Servers>echo %errorlevel% 3010
Searching BOL for 3010 returns nothing.
Other error codes that were seen are 1603 and 9009.
What do these error codes mean? Is there a place where they can be looked up?
I am designing a SSIS package where i get text file as input. This file contains transaction details.
I have to map the members in each transaction for data integrity. For this i am using Lookup object.
Lookup object works very well upto my expectations but i am facing problem in mapping the error code sent bythe this object whenever a record fails. I am storing all the invalid records into text file.
All the records get stored into text file along with some SQL Server error_code and error_column. I cant interpret these last two columns as it displays some numeric code and column name.
Is there any way to map these error codes and columns and get relevant information out of it? Example error code = -1071607778 error column = 0
I have a system using asp pages & ADO & SQL Server 2000, which processes files, builds a SQL insert statement from the file content and then executes it.
If the insert SQL fails, I need to know whether there was something wrong with the insert SQL, or something wrong with the database (e.g. SQL Server times out), and handle those differently,
Questions ======= 1. Is there an easy way to do this without checking against a list of error codes? 2. Can anyone point me to a list of errorcodes? Can't find this anywhere
Does anyone know where to obtain a complete list of error codes which can occur in SQL Server ? For example : errror number 547 is a foreign key violation - where can I get a complete list of these numbers and there descritions ?
Send Mail works fine when I just want to send a message. However, when I try to send the results from a query as an attachment, I get a ODBC error. Here is example of the code and the error code that I recieve.
Use MyDatabase go exec master.dbo.xp_sendmail 'Doe,John', @query = 'Select * from tblMyTable', @subject = 'SQL Server Report', @message = 'The contents of the tblMyTable:', @attach_results = 'TRUE', @width = 250 go
I have one application through which i m installing SQL Server 2005 Express Edition.
If some failure occures, all I get is one exitCode which is a return code of SQL Express installer. Is there any way by which I can find out the exact reason of failure.
One example is error code 28062.
This error code is for "sql is unable to install on compressed folder / drive".
Dim cmdLogin As New SqlCommand("select * from UserName where ='" & txtusername.Text & "' and Password='" & txtpassword.Text & "'", conn) Dim dr As SqlDataReader dr =cmdLogin.ExecuteReader()
The following (VB.Net) code causes exceptions at seemingly random times. Any suggestions? Not sure if the problem is in .Net's ODBC support or in Sql Native Client.
If MARS is off, usually after less than 100 loops:
Code Snippet
System.Data.Odbc.OdbcException was unhandled ErrorCode=-2146232009 Message="ERROR [HY000] [Microsoft][SQL Native Client]Connection is busy with results for another command" Source="SQLNCLI.DLL" Turning MARS is on bypasses that error, so it will sometimes survive a thousand or so runs before hitting:
Code Snippet
System.Data.Odbc.OdbcException was unhandled ErrorCode=-2146232009 Message="ERROR [23000] [Microsoft][SQL Native Client][SQL Server]Cannot insert the value NULL into column 'Number', table 'tempdb.dbo.#TempTable___..(shortened to fit).. _________000000002F3F'; column does not allow nulls. INSERT fails. Source="SQLNCLI.DLL" Code here: (Console Application, empty database, Visual Studio 2005, .Net 2.0, Windows XP,SQL Server 2005 or SQL Express 2005, Local or Remote)
Code Snippet
Module Module1
Sub Main()
'Dim connection As New SqlClient.SqlConnection("database=TestDB;server=.sqlexpress;Integrated Security=SSPI;") 'Doesn't crash 'Dim connection As New OleDb.OleDbConnection("Provider=SQLNCLI;database=TestDB;Server=.sqlexpress;Trusted_Connection=yes;") 'Doesn't crash
'Dim connection As New Odbc.OdbcConnection("Driver={SQL Native Client};Database=TestDB;Server=.sqlexpress;Trusted_Connection=yes;") 'Crashes Dim connection As New Odbc.OdbcConnection("Driver={SQL Native Client};Database=TestDB;Server=.sqlexpress;Trusted_Connection=yes;MARS_Connection=yes") 'Crashes
VBMath.Randomize()
Dim run_count As Integer = 1 connection.Open() Console.WriteLine("Connected!!")
While True 'connection.Open()
Dim testcmd As New Odbc.OdbcCommand("CREATE TABLE [#TempTable] (Number int PRIMARY KEY)", connection) testcmd.ExecuteNonQuery() testcmd.Dispose() testcmd = Nothing
Dim dtTemp As New DataTable Dim daTemp As New Odbc.OdbcDataAdapter("SELECT * FROM [#TempTable]", connection) daTemp.MissingSchemaAction = MissingSchemaAction.AddWithKey daTemp.Fill(dtTemp) Dim cbTemp As New Odbc.OdbcCommandBuilder(daTemp) Dim viewTemp As New DataView(dtTemp, Nothing, "Number", DataViewRowState.CurrentRows)
Dim i As Integer For i = 1 To 1000 Dim test_number As Integer = CInt(Rnd() * 2000) If viewTemp.Find(test_number) = -1 Then 'Keep it unique Dim new_temp_row As DataRowView = viewTemp.AddNew() new_temp_row("Number") = test_number new_temp_row.EndEdit() End If Next
daTemp.Update(dtTemp)
'daTemp.Dispose() 'daTemp = Nothing
'cbTemp.Dispose() 'cbTemp = Nothing
'dtTemp.Dispose() 'dtTemp = Nothing
'viewTemp.Dispose() 'viewTemp = Nothing
Dim testcmd2 As New Odbc.OdbcCommand("DROP TABLE [#TempTable]", connection) testcmd2.ExecuteNonQuery() testcmd2.Dispose() testcmd2 = Nothing
'connection.Close() 'GC.Collect()
'Console.Write(".") run_count += 1 End While
End Sub
End Module
Usually the ".Update" triggers the exception, but sometimes the other sql commands do it. Have tried various experiments with disposing of objects immediately when finished, but no effect. Opening and closing the connection each loop seems to delay the errors, but it still happens eventually.
PDA info: .NET CF 1.0 env-string... MS SQL client MS SQLCE 2.0 dev MS SQLCE 2.0
DESKTOP info: Microsoft SQL Server Management Studio Express 9.00.2047.00 Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158) Microsoft MSXML 2.6 3.0 6.0 Microsoft Internet Explorer 6.0.2900.2180 Microsoft .NET Framework 2.0.50727.42 Operating System 5.1.2600
copied an app from http://www.codeproject.com/netcf/PocketPCwithSQLCE/PocketPCwithSQLCE_Src.zip modified its CONFIG.XML to... <?xml version="1.0" encoding="utf-8" ?> <Configuration> <DatabaseServer>192.168.1.89</DatabaseServer> <DatabaseName>D1Temp</DatabaseName> <DatabaseLogin>sa</DatabaseLogin> <DatabasePassword></DatabasePassword> <SQLCEURL>http://192.168.1.89/SqlMobile/sqlcesa30.dll</SQLCEURL> <LocalDBConnect>Provider=Microsoft.SQLServer.OLEDB.CE.2.0; Data Source=My DocumentsMyFav.sdf;</LocalDBConnect>
have SQL Server 2005 std edition SP1 installed on Windows 2003 Std edition .Configured Transactional (single Publisher and no clustered environment.) Replication past two months working fine, Now 1.Distrib.exe application err is coming.
Due to which my job is failing (Distributor to Subscriber). Iam attaching thw file. Thanks Sandeep
I am developing a windows application that will run on every client station. This application will refer to a database located on a server station. Can I use MSDE for such application and if so how many remote concurrent connection can be open simultaneously?
I am working on a windows application (C#) that utilizes ODBC to acces paradox tables (works fine thought this would be the problem database) and a WinMobile database(.sdf) in order to sync table records. What I need to do is copy the .sdf file from the winmobile device then access it with this application to check for changed records on the PC and in the mobile database then copy it back to the mobile device via RAPI.
The program compiles fine but when I try to run the application I get this error. Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) .
I have already copied the System.Data.SqlServerCe.dll to my projects bin folder and then added a reference to it in the projects Reference dialog. These were also copied to the bin folder of the project
sqlceca30.dll
The SQL Server Mobile Client Agent. Required for applications that connect to SQL Server by using replication or remote data access.
sqlcecompact30.dll
Provides the compact database functionality. Required if your application will use compaction.
sqlceer30[language].dll
Contains error strings for SQL Server Mobile-generated errors. Required for all SQL Server Mobile applications.
sqlceme30.dll
Contains code required by the System.Data.SqlServerCe.dll file. Required for all SQL Server Mobile applications.
sqlceoledb30.dll
Provides OLE DB connectivity to SQL Server Mobile databases. Required only if your application uses OLE DB to connect to the SQL Server Mobile database.
sqlceqp30.dll
The SQL Server Mobile Query Processor. Required for all SQL Server Mobile applications.
sqlcese30.dll
I also added using System.Data.SqlCE to the form and the dataset designer.cs
From this code in the dateset.Designer.cs file after the run is started the eroror occurs.
On PC : Access application + Access DB On PocketPC : Embedded Visual Basic 3.0 application + PocketAccess DB
I synchronise my DBs through ActivSync.
It runs good before Windows Mobile 5.
My customers asked me for new PocketPC with this application, so I bought some new PocketPCs : but as I see, syncronisation with Access is no more supported.
So what are my solutions ?
My customer wait for there PocketPC, so I need a quick solution, I don't want to rewrite all my application now. My application run before WM5, so now I don't want to have to pay for a Visual Studio .Net, some SQL Server, etc ....
Please, what are the solutions that won't cost me more than the time that have already lost with this new Windows Mobile 5 ?
Is there a way to control some of the windows application log settings from within the logging process of a package. Specifically the 'source' parameter which comes out as 'SQLISPackage' which i'd like to be the actual name of the package which wrote to the log, and similarly 'Category' which comes out as 'none' and I'd prefer to assign something more meaniful ?
I have to search the keyword from windows application using dtSearch. when user enter the list of keywords in UI, i have to connect to dtSearch tool and based on the output return, the matched keyword should be added to database table.
Now, i have problem in connecting this tool from my application.
Hi there, i am building a mobile app using vs 2008, the app has about 8 - 12 forms that collect data.. i am thinking of
i am trying to decide how i want to save the temporary work data while the user fills the data collection forms.
when the user selects to create a new report, i will
create a new xml file... as user moves from form to form, i will update the file when the user has finished filling up all the data i will create a transaction and insert the data into the sql ce database and delete the file...
i will be using sql ce 3.5 i think it supports transactions i think it also supports identity.... i am using sql management studio 2005 standalone , so i cannot visually modify the 3.5 sdf.,..,. is there a tool for 2008 that will let me visually modify the table(s)? i dont want to use the 2008 feb community edition...
is there a better way to do this? should i skip the xml and go directly into sql ce insert (for the first record creation) and updates? i think this will be a performance killer on a win mob devilce (5.0)
p.s. i cannot store data in a class, and then commit the class to the transaction because if the application crashes i will loose class data, so xml file will be needed.,
Hi there, I have a question which I put the company that host my website but I didnt get a conclusive answer. Maybe someone here will be able to advise or help me with my situation. I want to build a database that I will run on my local server and the front end of this will be run using a windows application. I have a website which I run the database on the remote server. What I would like to do is to be able to synchronize certain tables between the two databases (such as updating products table, or orders table). I am using sql server 2005 and I am using the sql server management studio to access my database on the remote server. I did notice there is a synchronzie button. I also came across some 3rd party tools. Not sure if that is the way to go. If anyone as done this before or can give me any suggestions, I would be delighted. Thanks Anthony
HelloI use vs2008 and i try to make a simple windows program with add records to a database. The problem is the database don't store the values that i add. When i run my program (in design mode) everythynf looks fine, but if i close vs2008 and restart it again the database is empty. Why? Thank you
I'd like to build a simple search engine against Sql Server. Does .NET Framework provide some class to help in this task? From what I've heard there is an interface which implements it..
Hi, I'm writing a windows application using VB.NET 2005 that must connect to Pocket PC via ActiveSync to read data from SQL Server CE. This is my code:
I'm a database newbie, trying to decide whether to create an SQL Server or Windows Application project that uses SQL Server 2005 Express. As I understand it, the advantage of an SQL Server project is that the app deploys somehow as part of the database. If that's the case, how would I handle the scenario where the database has been updating at customer site and I need to install just a new release of the software? Would I be better of creating a Windows Application project and connecting to the database explicitly? Thank you.