SQL Mobile Create Sdf File From SQL 2005 DB

Dec 28, 2006

Hi,

I'm trying to create a SQL Mobile .sdf file from my SQL Server 2005 database and cannot. I read the ms support docs for doing this and have had no luck . I created the respective publication and SQL Subscription for the db and when i run the process (not sure if i'm running the right process - docs don't say) it creates a directory under a "unc" directory with all my table objects (articles) with subscription/replication files for each table such as .cft, .bcp, .dri, .prc, .sch, and .trg. But no .sdf file for my SQL Server 2005 database.

All I want is the .sdf file so that i can copy it to my Pocket PC device and then connect my mobile application to it. I want to copy my SQL Server 2005 database to my device so that the mobile app uses the db on the device. Sounds easy - but it's not. Can someone tell me the easiest way to do this or point me to a doc that explains it. I checked the ms support docs and they state "after the .sdf file has been created..." in "Pre-building a SQL Server Mobile Database" doc. Where/How is the .sdf file created is what I would like to know?

Any help would be appreciated.

Thanks - Dave





View 16 Replies


ADVERTISEMENT

SQL 2005 Mobile : The File Is Not A Valid Database File

Jun 8, 2006

I used SQl Server replication to create a new database (as I did using Visual Studio 2003) but when I go the Pocket PC and click on the file I get a native error 25011 with a description

The file is not a valid database file
An Internal error has occurred[,,,Databasename,,]
Interface defining error: IID_IDBInitialize

When I check on my Pocket PC what programs are available I've got Query Analyser 3.0 and SQLCE Query. It appears that the .sdf file is associated with SQLCE Query because when I use that to try and connect to the same database I get the same error.

If I use Query Analyser 3.0 (after having copied the .sdf file) to the temp directory I'm able to open the database.

There is a similar post to this one but it doesn't help me.

Is it that SQLCE Query is wrongly associated with the .sdf file?

If so how do I change that?

Or is there some other problem preventing me clicking on the .sdf db to open it?

I have recreated my project in Visual Studio 2005 and rebuilt all my components in 2005. There are some external ones that I use that I can't do this for.

The following is the build output that I get when I deploy to a clean PDA with a hard reset performed

------ Build started: Project: Printing, Configuration: Release Any CPU ------
No way to resolve conflict between "System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral,

PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes" and "System.Data.SqlServerCe, Version=1.0.5000.0, Culture=neutral,

PublicKeyToken=969db8053d3322ac, Retargetable=Yes". Choosing "System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral,

PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes" arbitrarily.
Printing -> C:DevmillarMobileSellercode2005MobileSellerMobileSellerPrintinginReleasePrinting.dll
------ Build started: Project: MobileSeller, Configuration: Release Any CPU ------
Consider app.config remapping of assembly "System.Data, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes"

from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:Program FilesMicrosoft Visual Studio

8SmartDevicesSDKCompactFramework2.0v2.0WindowsCESystem.Data.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Windows.Forms, Culture=neutral, PublicKeyToken=969db8053d3322ac,

Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:Program FilesMicrosoft Visual Studio

8SmartDevicesSDKCompactFramework2.0v2.0WindowsCESystem.Windows.Forms.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from

Version "1.0.5000.0" [] to Version "2.0.0.0" [C:Program FilesMicrosoft Visual Studio

8SmartDevicesSDKCompactFramework2.0v2.0WindowsCESystem.dll] to solve conflict and get rid of warning.
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Microsoft.Common.targets : warning MSB3247: Found conflicts between different

versions of the same dependent assembly.
MobileSeller -> C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerinReleaseMobileSeller.exe
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(546,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(634,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(706,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(846,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
Done building project "MobileSeller.vbproj".
------ Skipped Deploy: Project: BO, Configuration: Release Any CPU ------
Project not selected to build for this solution configuration
------ Skipped Deploy: Project: Printing, Configuration: Release Any CPU ------
Project not selected to build for this solution configuration
------ Deploy started: Project: MobileSeller, Configuration: Release Any CPU ------
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerBOinReleaseInTheHand.Data.Adoce.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerBOinReleaseInTheHand.Interop.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerPrintinginReleasePocketHTMLprint_NetCF.dll'
Deploying 'C:DevMILLAR CODE CABINETVS2003CFReferencesUSICF.dll'
Deploying 'C:DevVS2005CFReferences
eleaseSignature.dll'
Deploying 'C:DevVS2005CFReferences
eleaseRealUpDown.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerPrintinginReleasePrinting.dll'
Deploying 'C:DevVS2005CFReferences
eleasePhoneAPI.dll'
Deploying 'C:DevVS2005CFReferences
eleaseMVnetApplication.dll'
Deploying 'C:DevVS2005CFReferences
eleaseMobileHList.dll'
Deploying 'C:DevVS2005CFReferences
eleaseMobileGrid.dll'
Deploying 'C:DevVS2005CFReferences
eleaseImageButtons.dll'
Deploying 'C:DevVS2005CFReferences
eleaseCreditCardValidator.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerBOinReleaseBO.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerinReleaseMobileSeller.exe'
========== Build: 3 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 2 skipped ==========

View 5 Replies View Related

Failure To Create First Replicated Database (SQL Mobile/SQL Server 2005) / Err 28627

Jan 8, 2006

Hi,

I'm trying to get my first replication going, and I have set up a database successfully, along with merge replication, however when I attempt to create the first subscriber, I get a permissions issue, regardless of what I do. In the SQLCESA30.LOG file, I get the following entries:

2006/01/07 16:59:36 Hr=00000000 SQLCESA30.DLL loaded 0
2006/01/07 16:59:58 Hr=80004005 ERR:OpenDB failed getting pub version 28627


I posted the initial thread under the "Replication" forum, but am including this 'pointer' post here due to a lack of replies there, and the relevance of this thread to this forum. Please see http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=193693&SiteID=1 for more details.

 

Thanks.

View 1 Replies View Related

SQL Server Mobile 2005 Merge Replication Problem On Windows Mobile 5.0

Aug 8, 2006



Dear ppl,

I am writing an application for a device (MDA Pro T-Mobile) having Windows Mobile 5.0 using

-MS .NET Compact Framework 2.0 SP-1
-SQL Mobile 2005.
-VS 2005 .NET

The application uses Merge Replication. The error occurs in the Synchronise() Method of the SqlCeReplication object.

"SQL Server Mobile encountered problems when opening the database."

repl.AddSubscription(AddOption.CreateDatabase);
repl.Synchronize();

I don't understand why I am having this error. It does create the database on AddSubscription() method but it is failing opening the database on Synchronise(). I have also tried uninstalling and then reinstalling all the SQL Mobile components in the following order.

-sqlce30.wce5.armv4i.cab
-sqlce30.repl.wce5.armv4i.cab
-sqlce30.dev.ENU.wce5.armv4i.cab

However, when i run this application on a device(Dell X50 AXIM) with Pocket PC 2003, it runs fine creating the database and sysnchronising it.

The target platform for the project is Windows Mobile 5.0 Pocket PC SDK.

Does any one have any clue what could be the problem ?

Regards
Nabeel

View 6 Replies View Related

SQL Mobile 2005 Replication - SQL Mobile DLL Could Not Be Loaded - Error 28559

Jun 15, 2006

I am migrating a pocket PC application from VS 2003 to VS 2005 and a few weeks ago I hit the following problem when replicating

A SQL Mobile DLL could not be loaded. Reinstall SQL Mobile. [ DLL Name=sqlceca30.dll]

Scanning forums for help I saw that other people had had this problem and one

http://www.eggheadcafe.com/aspnet_answers/NETFrameworkCompactFramework/Feb2006/post25814466.asp

suggested that this problem could be circumvented by getting the replication object early and then continuously using the same object for subsequent replications.

I did this and it works a lot better now but ever so often I get another error which is

Native Error 28559 SQL Mobile encountered problems when opening the database

My only option at this point is to stop and start the application which cures the problem.

View 4 Replies View Related

Problem Using SQL Server Mobile 2005 With Windows Mobile 5 Application

Mar 23, 2006

Hello,

I am developping a non-managed C++ application for PocketPC using a SQL Server mobile database.

The application is compiled for PocketPC 2003 and uses SQL Server Mobile v2. I use Visual Studio 2005. But I need to compile the application for Windows Mobile 5.0 devices. So I installed the WM5 SDK and had the WM5 into my project configuration.

The "ssceoledb.h" which I include incluses the "transact.h" file. But my problem is that this file is only provided with the PocketPC 2003 SDK and not in the WM5 SDK.
So I cannot use the WM5 configuration project with SQL Server. I also tried with the last SQL Server Mobile 2005 (ie v3.0) and the "ssceoledb30.h" also includes "transact.h".

Did I miss something to install ?
Do you know how I can resolve the problem ?

By advance, thank you for any answer.

--
Gregoire

View 9 Replies View Related

How To Create, Install And Deploy Dts File For Sqlserver 2000 And Dtsx File For 2005 ?

Apr 24, 2007

Hi,



I am looking for tutorials about how to create dts et dtsx files.

Thanks for your help.



Arioule.

View 1 Replies View Related

Create Mobile Database From Xls, Csv, Text Or Mdb

Nov 28, 2006

Hello,

Since my experience in VS is extremely limited, i'd like to be exused if questions sound silly.

My problem is that, at my device application project, i want to build a database that will retrieve data from .xls, or .csv, or .txt, or .mbd files. If i've noticed well, there is no support for OLEDB or ODBC, since by the time that i add tableadapter to my database.xsd and use these, after insertion i get multiple errors informing that system.data.oledb. .... or .odbc "type is not defined".

If it cannot be done, and since i still try to figure out how smart devices function, transact with databases, e.c.t. is there any suggestion?



Thank you in advance

Kostas

View 8 Replies View Related

Create A Mobile Database On Desktop

Jan 21, 2006

I have searched through this forum and the news group

microsoft.public.sqlserver.ce

for this topic. I only find a post from Darren Shaffer and I requested a document.

Unfortunately, there is not a clear example of how to create a mobile database (sdf) on a desktop machine which contains VS 2005 and SQL server 2005 by using Visual Basic 2005.

I am sure a clear example in VB for this problem would help a lot of people. Hence anybody who knows how to perform this task, Please help these people.

Thanks in advance

Talat

View 1 Replies View Related

How And Where Should I Create A Mdf File If I Installed A Sql Server 2005(Developer EditioN)

Aug 31, 2006

hi:

I am a newbie to sql server 2005 (developer edition). Now I installed both sql server and VS 2005 professional edition on my machine.

I just what to know how and where should I create a mdf file on my server or .net window project because I try to combine to it from a window application. Should I use the sql server management studio or the Visual Studio 2005 ? What is the generate steps to create one?

I am completely confused. Please help me, I cannot find related on line source.



Thank you, thank you

bigheadjj

View 7 Replies View Related

SQL Server 2005 Mobile Edition ANd SQL Server CE - SHould I Have Uninstalled Mobile First ?

Sep 16, 2007



Hi:

When I try and connecto to SQL CE I always get an invalid operation exception. I"m afraid that I did not follow the proper install for Orcas Beta 2. I can't remember if I was supposed to uninstall SQL Mobile 2005 first or not.

All I know is when I try and use my SQL CE I can't connecto to a DB / sdf file ?

Any help would be appreciated I"m just starting to use SQL CE.

thanks
mark

View 2 Replies View Related

Unable To Create SQL Server Mobile Subscription

May 1, 2006

I have been following Creating a Mobile Application with SQL Server Mobile:

http://msdn2.microsoft.com/en-us/library/ms171908.aspx

I have successfully created the snapshot.

When performing the following:

Configure the publication for Web synchronization






In SQL Server Management Studio, in Object Explorer, expand the (local) computer node.


Right-click the Replication folder, and then choose Configure Web Synchronization

There is no option when Right-clicking the Replication folder under my local server, however there IS an option for Configuring Web Synchronization on the Replication folder under SQL Server Mobile. (Unfortunately the Configure the publication for Web Synchronization is listed BEFORE the SQLServer Mobile Task, so it is pretty confusing) So, assuming this is what the author meant, I successfully configured the Web Server and the SQLMobile shows under my default web site.



When I attempt to create a Subscription under SQLServer Mobile, I get the following error:



- Synchronizing Data (Error)



Messages

Unexpected HTTP status returned. [ 415,status = ]
HRESULT 0x80004005 (28632)


The operation could not be completed.


Am I missing something? Should the web configuration be done on my local SQL Server, not the SQLServer Mobile replication directory? If so, how come I do not have that option as suggested in the directions?

I have checked and rechecked permissions. As I mentioned, the snapshot is successfully created (verified by Right-clicking the publication and viewing the snapshot agent status)



View 9 Replies View Related

CREATE INDEX Statement For SQL Mobile Not Documented?

Nov 16, 2005

Hello,

View 5 Replies View Related

Can I Create Database Using Backup File In SQl Server 2005 Express Edition

Jul 21, 2007

hi
       i have a database file backup which is having no extension (eg saims) . Can i create a database using this backup in sql server expression edition.
 Or else is there any way to get the .mdf file from sql server 2005 full edition??????????????
Thanx in advance

View 2 Replies View Related

Create Tables And Insert Data In Sql Server Mobile On Dekstop

Mar 2, 2006

Hello (sorry my bad english, im brazilian)

I was using Visual Studio 2003 and SQL Server CE 2.0 for C# mobile applications. The .sdf database were created in the emulator or in the mobile device itself using Query Analizer.

The application developed need some initial data to run, and this data is obtained executing one service that reads a postgree database, and insert the data in the SQL CE database of the mobile device. But, given the size of the database (maybe 10.000 rows), it tooks too much time (sometimes 6 hours).

Now we are migrating to Visual Studio 2005 and SQL Server 2005 Mobile Edition.

I want to know if its possible to create the .sdf database and load the data into this database on the desktop. Maybe through the execution of a .sql script, or through a service executed on the desktop.

After this, its just upload de .sdf file to the mobile device.

Thanks

Robson

View 8 Replies View Related

Can Not Create SQL Mobile Database On Server: The Operating System Does Not Support Encryption

Oct 12, 2007

I have code that creates a SQL Mobile database on a server. It has worked in many environments, but I have one customer experiencing an issue. It will not create the database on their server. I would appreciate any thoughts.

The exact error message I get is "the operating system does not support encryption"

I am getting it on the line: SQLCeEngine.CreateDatabase()

Here is the code:
SQLCeEngine = New SqlServerCe.SqlCeEngine(SQLConnectionString)
ReturnValue += ": Declare new"
SQLCeEngine.CreateDatabase()
ReturnValue += ":Create"
SQLCeEngine.Dispose()
ReturnValue += ": Dispose"

Here is the error message I get from our application- the part after Err: is the actual error message from the system:
Data Source = D:EVADATAWebServiceDownloads est;Password=test;Persist Security Info=False;: Declare new:Error!:Err:The operating system does not support encryption.

When I go into SQL Express and create a SQL Mobile database using it, it can be created. So, I have to believe it can be done on the server, but I don't know why the code can not do it.
(e.g. FileConnect Object ExplorerServer Type: SQL Server compact Edition and create a database). The database is successfully created if I do it manually this way. It even creates fine if I select the 'Encrypt' button.

The machine is a Windows 2000 Server sp4 version 5.00.2195
SQL 2000 is installed
SQL 2005 Express is installed
I ran the SQLServerCE31-EN.msi file and it is installed. (I have also re-run and repaired it)
I have also copied over the newest version of our code from scratch.

SQL Server mgmt Studio: 9.00.3042.00
MDAC 2000.085.1128.00
MSXML 2.3 3.1 4.0 5.0 6.0
IE 6.0.2800.1106
.NET Framework 2.0.50727.42
Operating System 5.0.2195

View 13 Replies View Related

IID_IDBDataSourceAdmin Error Trying To Create A Database Using Query Analyzer On A Mobile Device

Sep 25, 2007



Hi,

Please provide some help regarding the "Interface Defining Error: IID_IDBDataSourceAdmin" error while trying to create a SDF database using Query Analyzer on a Windows CE 5.0 mobile device (Symbol MC3000).

Error: 0x80004005 E_FAIL
Native Error: 28558
Description: SQL Mobile encountered problems when creating database [,,,,]

Param. 0: 0
Param. 1: 0

Param. 2: 0
Param. 3:
Param. 4:
Param. 5:

A list of (related) installed packages:

NETCFv2.wce5.armv4i.cab
sqlce30.dev.ENU.wce5.armv4i.CAB
sqlce30.repl.wce5.armv4i.CAB
sqlce30.wce5.armv4i.CAB


PS.
Basically I have developed a mobile application that programmatically creates the database, the code worked on a similar device (Win CE 50), trying to run the application on a new device resulted in database creation errors. I tried creating a test database manually .. and this is what I got.

Browsing MSDN or searching on the Forum did not help.

~Zarko Gajic

View 3 Replies View Related

How Do I Measure Bandwith Usage For Merge Replication SQL 2005 To Sql Server Mobile 2005?

Jan 24, 2007

Hi,

Is there any way to measure bandwith usage during merge replication between sql server 2005 and sql server mobile 2005 running on a cradled wm5 mobile device.

Attaching the windows performance monitor to the network connection established over usb would work although I was wondering if there was something specific for this case integrated into Sql server 2005 / sql server mobile 2005 / Sql server management studio / third party tools that i could use ?

thnx,

pdns.

View 4 Replies View Related

SQL Server Standard 2005, SQL Mobile 2005 Data Encryption Issues

Jul 26, 2007

Hi,

I have a central database server that is runnning on SQL 2005 standard edition and Windows server 2003 standard as OS.

I realise that I can use SQL statements to encrypt and decrypt the data inside the standard SQL.

However, how do I read and write the data via an web application coded in C#.net and is also running on the same machine?

Another issue is, I need to replicate some of the data in this SQL standard over to a SQL mobile running on a mobile device running on Windows CE 5.0.

The mobile device also needs to read and write data to the encrypted data via a C#.net application.

Question is, with all these requirements to be met, can I use AES? I know that AES is not available on Windows XP and Windows Server 2000 and I cant find AES in the .net compact framework.

how do i go about ensuring security? how do I ensure that the symmetric key is the same both on the SQL standard and SQL mobile?

thank you.

View 7 Replies View Related

RAPI CopyFileToDevice Slow After Switch From Mobile 2005 To Compact 2005

Sep 12, 2007

I have a windows forms application that runs on my PC that populates a SQL Server Compact 2005 database and then transfers that .sdf file to my mobile device. The communication between the mobile device and PC is done using the Desktop RAPI class from OpenNetCF (http://www.opennetcf.com/FreeSoftware/DesktopCommunication/tabid/90/Default.aspx)

Anyway, I was previously using SQL Server Mobile 2005 and my populated .sdf was around 1.7 MB and I could transfer it to my mobile device in a minute. Once I switched to SQL Server Compact 2005, the transfer process began taking 3 minutes with a 1.5 MB .sdf file. The SSCE also got bloated more easily so I added in the Compact operation each time after I fully populate the SDF to keep the file size at 1.5 MB, but even then it still takes 3 minutes.

I've done a few tests where I simply switch between the two database versions and that simple switch of the version changes the transfer time. I am dumbfounded trying to figure out what the cause might be. Since it is just a file transfer, why would the version even matter unless somehow SSCE is really not compacting and lying about its actual size.

Has anyone run into anything similar to this or may have any ideas what might be going on?

Thanks.

View 3 Replies View Related

SQL Server 2005 Management Studio Only Can Connect To 2005 Mobile Edition?

Jan 9, 2007

hi,

I have some SQL CE database .sdf file on my handheld, and I was trying to connect to that file via SQL Server 2005 Management Studio, and it does not work. I am wondering if there is any good tool that I can use on desktop to connect to sqlce .sdf database file on my handheld?

Thanks.

View 1 Replies View Related

Help Needed In Merge Replication, SQL Server 2005 Mobile Edition And VC# 2005

Apr 10, 2008

I have written following code in my application

I just want to display all the data of a Single table into a Data Grid, I know that we can drag and drop the table on to a form and datagrid is generated, but here I want to retrive those values through my code, how should i do that

I am getting following errors while running the program
Error 1) Error No. 28037, MS SQL Server 2005 Evrywhere Edition
Error: A request to send data to the computer running IIS has failed. For more information see HRESULT
Error 2) Error No. 0, SQL Server 2005 Evrywhere Edition ADO.Net Data Provider
Error: The specified table does not exist [ JobLists ].

Can anybody please tell me, where I went wrong ??? In this code anywhere else????

Note: While adding a Data Source of SQL Server 2005 Mobile Edition, I have added that .sdf file into my project, thats why I have written the Data Source as : .DbFile.sdf



@"Data Source = .DbDotNetCF.sdf";


The code is as follows:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;

namespace DeviceApplication1
{
public partial class Form1 : Form
{
string filename = @".DbDotNetCF.sdf";

private DataSet dsJobLists;

public Form1()
{
InitializeComponent();
}

private void DeleteDB()
{
if (System.IO.File.Exists(filename))
{
System.IO.File.Delete(filename);
}
}

private void Sync()
{
SqlCeReplication repl = new SqlCeReplication();

repl.InternetUrl = @"http://localhost/WebsiteDotNetCF/sqlcesa30.dll";
repl.Publisher = @"RAHU";
repl.PublisherDatabase = @"DotNetCF";
repl.PublisherSecurityMode = SecurityType.NTAuthentication;
repl.Publication = @"PubDotNetCF";
repl.Subscriber = @"SubDotNetCF";
repl.SubscriberConnectionString = @"Data Source='" + filename + "';Max Database Size=128;Default Lock Escalation =100;";
try
{
if (!System.IO.File.Exists(filename))
{
repl.AddSubscription(AddOption.CreateDatabase);
}
repl.Synchronize();
}
catch (SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
finally
{
repl.Dispose();
}


// Display Same Data In Another DataGrid : dataGrid1
SqlCeConnection cn = new SqlCeConnection(@"Data Source='" + filename + "'");

SqlCeDataAdapter daJobLists = new SqlCeDataAdapter("SELECT JobListsID, JobID, PersonID FROM JobLists", cn);
if (dsJobLists == null)
{
dsJobLists = new DataSet();
}
try
{
dsJobLists.Clear();
daJobLists.Fill(dsJobLists, "JobLists");
dataGrid1.DataSource = dsJobLists.Tables["JobLists"];
}
catch (SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
}

private void DisplaySQLCEErrors(SqlCeException ex)
{
for (int i = 0; i < ex.Errors.Count; i++)
{
MessageBox.Show("Index #" + i.ToString() + ""
+ ex.Errors.Source + ""
+ "Error: " + ex.Errors.Message,
"Error No. " + ex.Errors.NativeError.ToString());
}
}

private void Form1_Load(object sender, EventArgs e)
{
Sync();
DeleteDB();

if (DbDotNetCFDataSetUtil.DesignerUtil.IsRunTime())
{
// TODO: Delete this line of code to remove the default AutoFill for 'dbDotNetCFDataSet.JobLists'.
this.jobListsTableAdapter.Fill(this.dbDotNetCFDataSet.JobLists);
}
}
}
}



I have created a merge replication correctlly( I suppose, there were no errros)
Please help

Your help will be appriciated

View 1 Replies View Related

VS 2005/SQL Server2005 - Direct Connection From Win Mobile Emulator To Desktop SQL Server 2000 Or 2005

Aug 10, 2007

Hello Everyone,

I'm trying to connect to Desktop SQL Server 2000 from Windows mobile PC Emulator (VS 2005). I need a direct connection using connection string to SQL Server 2000 through local wireless network without IIS.

Bellow is the code that I use. After executing this code I get an error on line Conn.Open(). Error says SQL Server does not exist or access denied.
SQL is un and running, and I can log in using SA username from the desktop. Even if I chance IP for another SQL server in my connection string I still get the same error. There is no firewall of any kind running.


Dim connectionSTR As String = "Persist Security Info=False;Integrated Security=False;Server=192.168.0.202,1433;initial catalog=MyDB;user id=sa;password=;"

Dim Conn As SqlConnection

Conn = New SqlConnection(connectionSTR)

Conn.Open()


If Conn.State = ConnectionState.Open Then
MessageBox.Show("Open")
End If


About my environment: SQL Server 2000 is running on Desktop PC with Windows XP SP2. Application which I need to connect to SQL Server is in Visual Studio 2005. I execute the application in Windows Mobile PC Emulator and try to connect to SQL Server from emulator.

Your advice and help is very appreciated

Thank you

Ika


View 3 Replies View Related

SQLCe Errors When Doing Developing A SQL Mobile Application With Visual Studio 2005 And SQL Server 2005 Tutorial

Feb 26, 2008

I'm attempting to use RDA to synchronize a pocket pc emulator with SQL Server 2005 database by following tutorial http://msdn2.microsoft.com/en-us/library/aa454892.aspx, which uses AdvWorksMobile database that comes with SQL Server 2005.

When get to testing of "To test application features " ( step 4 of the merge replication setup lab ), I am receiving SQLCe Exception errors.

ORIGINALLY, I was able to deploy an application and view the local database on the emulator, but once I clicked "InitSinc" button, I received an error.

"Failure to connect to SQL Server with provided connection information. SQL Server does not" exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect.
Found this error listed in Server Agent Errors log http://technet.microsoft.com/en-us/library/ms172357.aspx, but it wasn't very helpful since it doesn't provide any suggestions on fixing the problems.

I am brand new to SQL CE Server , mobile programming and .NET framework in general so please bare with me



All the connections / security settings, etc that were set up were taken from a tutorial so I am not sure what SQLCeServer is complaining about. Reading up on the error on the web didn't help, it all pointed to making sure that the snapshot folder had correct permissions set up. I verified that MACHINENAMEUISR_MACHINENAME guest user had Read rights to the database so I don't think that piece is the problem. Otherwise ,Merge publication has been setup in Microsoft SQL Server Management Studio by following the tutorial.


I am trying to run this sync on my home pc so there should be no issues with any user permissions


I have IIS installed


I did NOT have SQL Server Agent running in management studio at this time


I am trying to run this tutorial on an XP machine, which is my regular home PC so I dont think there are any special networking settings to consider


I am able to hit http://localhost/AdvWorksMobile/sqlcesa30.dll from my pc OK, but when I try to hit it from a cradled emulator ( after replacing "localhost" with "MACHINE_NAME" ), Internet Explorer on the emulator gives me a "Cannot Connect With Current Settings" error message. This part wasn't part of tutorial but decided so not sure if I am supposed to be able to hit it from my emulator..so I am not sure if the fact that I can't hit it is related to the problem.
AFTER STARTING SQL SERVER AGENTin Microsoft SQL Server Management Studio, I killed the application, and after relaunching it, it hits "The Specified table does not exist [Vendor]" error. This time it doesn't even launch first - that is I dont even get to pressing "InitSinc" button. Debugger is showing that this error is hit on the following line in AdvWorksMobile.AddWorksDataSetTableAdapters

int returnValue = this.Adapter.Fill(dataTable);

I am not sure why the errors changed on me after starting SQL Server Agent.
What can I do to fix this connection problem?

Thank you so much for your help!

Irina


View 3 Replies View Related

Installing Sql Mobile Via CAB File

Nov 8, 2005

Hi guys,

View 1 Replies View Related

Windows Mobile 5.0 Application &&> Xml File &&> Sql Ce 3.5

Mar 12, 2008



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.,

suggestions?

View 7 Replies View Related

Mobile Sdf File Created On Server

Aug 15, 2007

Hi there,

Background: I've created an application to run on windows mobile 5.0 devices. It replicates to a publication on a server. To do this it goes through ASP.net. This creates the database on the Mobile Devices.

Issue: Problem is the initial download of the database is taking 2hours plus to replicate (create) for the first time. So I'm trying to create the .sdf file on the server, zip it, and send it across to the handheld. All subsequent replications take about 5 minutes.

Question: Does anyone know how, or have examples for creating a Mobile CE database on the server. I need to create it using ASP.net and go through a pre-existing publication where a hostname used for filtering.


http://msdn2.microsoft.com/en-us/library/ms173009.aspx explains how to create this in SQL Server Management Stuidio. How do you do the same thing over ASP?

Can this be done using SMO? How do you create a SQLServerCompactEdition database using normal .NET Framework? Thanks for your help!!

View 5 Replies View Related

Difference Between SQL Mobile 2005 And SQL Compact 2005

May 24, 2007

Hello,

Could someone give me the difference between "Sql Mobile 2005" and "Sql Compact 2005".
At first I thought they were the same, that this was just something of the change in naming the server has had the last months.
My first guess was that Mobile would be the new one, but I have 'accidently' downloaded the Compact and what seems the System.data.SqlServerCE.dll is newer.

So is there a difference?
If yes, what are they.
If not, is the "compact" then the latest version and the name to be used (since on the site only "mobile" is mentioned).

Best regards,
Ike Casteleyn

View 6 Replies View Related

SQL Mobile 2005 Merge Replication With SQL 2005 X64

Jan 10, 2006

I am having trouble with getting Merge Replication up with a new SQL 2005 x64 Server.  I already have it running smoothly with SQL 2005 Mobile and SQL 2000, but I want to migrate the backend to SQL 2005.

There is a front end server running IIS 6.0 on Windows 2003 x86 Standard (Server A) with SSL required and Basic Authentication set as the only authentication method (default Domain and Realm are also set).  The backend server is running SQL 2005 x64 Standard on Windows 2003 x64 Standard (Server B).  The mobile devices are running Windows Mobile 5.0 with SQL 2005 Mobile (Client).

From both a standard Windows XP workstation (IE) and the Client (PIE) I can browse to the HTTPS site on port 444 for the sqlcesa30.dll on Server A and get a response in normal and ?diag modes.  The ?diag gives success in all but the 8.0 Database Reconciler (I didn't install the SQL 2000 replication components on Server A, my understanding is they should not be needed).  Sql Server Module Versions are as follows: sqloledb.dll - 2000.86.1830.0, 9.0 replrec.dll - 2005.90.1399.0, 9.0 replprov.dll - 2005.90.1399.0, 9.0 msgprox.dll - 2005.90.1399.0.

The publication on Server B is enabled for Web Synchronization and the Snapshop Agent has run.  There are no reported errors on that side.

Since I ran into issues getting synchronization to run I have opened up permissions fairly wide in this test environment.  The PAL and the Database both have the user I am attempting to sync with listed (I am using the Administrator account in the test domain).  I have opened full rights on the Snapshot share on Server B to Everyone (both NTFS ACL on the directory and the Share permissions).  The virtual directory on Server A containing the sqlcesa30.dll has also been opened very wide, and the Application Pool does have access to it.

The Client is running a custom C#.NET 2005 application.  With the exception of changes to set the application to sync with the Server A/B duo instead of the production servers, this application is identical to the code currently being used in production with SQL 2000 Standard.

The persistent error that I am getting from the Client being thrown by SQL 2005 Mobile when I attempt to sync is "An instance of the SQL Server Reconciler error object cannot be created.  Try reinstalling the replication components."

SQL 2005 Mobile components on Server A are set to Logging Level 3 but not returning any errors that I can see to troubleshoot with.  All replication components appear to be installed and operational, although I have re-installed them.

Besides the obvious question of how to solve the error listed above, is there an issue with am x85 front end IIS 6.0 server talking to an x64 back end SQL 2005 server for merge replication over HTTPS with Windows Mobile 5.0 clients running SQL 2005 Mobile?

Based on everything I have read off the MSDN Forums, MSDN articles, BOL, log files, and web searches it seems like I should have an operational synching topology, however clearly I have missed something because I have yet to get a successful subscription through to the publication.

Any insight/enlightenment would be greatly appreciated, this seems to be a very narrow and specific area of replication and mobility and information is relatively sparse from my experience so far.

Thanks!

 

 

View 5 Replies View Related

File Sharing Violation In SQL Server Mobile Edition

May 5, 2008



Hi,
I am facing a wierd problem working with SQL Server Mobile edition database. The code works fine for some time and then it suddenly starts throwing "There is a file sharing violation. A different process might be using the file."
I am disposing and closing the connection after each operation.
Please find the function code below which is being used for any database operation.

SqlCeConnection sqlCon = null;
try
{
sqlCon = ConnectionFactory.getInstance().getPrimDsConnection();
sqlCon.Open();
readCmd = sqlCon.CreateCommand();
this.prepareStmtManyRows();
dataReader = this.readCmd.ExecuteReader();
IList result = this.populateManyRows();
return result;
}
catch (SqlCeException sqlEx)
{
StringBuilder builder = new StringBuilder(
@"SqlCe Error in BaseReader.executeList() - ").Append(
sqlEx.Message).Append(':').Append(sqlEx.NativeError);
Log.getInstance().log(builder.ToString());
throw new DataAccessException(sqlEx);
}
finally
{
try
{
if( null != dataReader && ( !dataReader.IsClosed ))
{
dataReader.Close();
dataReader.Dispose();
}
if( null != readCmd) readCmd.Dispose();
if( null != sqlCon) sqlCon.Close();
}
catch (System.Exception ex)
{
}
}

I have also made sure that Query Analyzer is not running on my PDA.
I have been working on this since last one week but could not find a soultion.

Thanks,
A Islam

View 7 Replies View Related

SQL 2005 Mobile Vs .NET CF 2.0 SP1?

Sep 22, 2006

Hi. I'd like to try a hand at SQL 2005 Mobile.

I've installed sqlce30.ppc.wce5.armv4i.CAB on an HP iPaq 1950 Pocket PC, provided by the Microsoft SQL Server 2005 Mobile Edition Device SDK, http://www.microsoft.com/downloads/details.aspx?FamilyId=5BD8ABAA-5813-4DB3-B23A-24551DE2ECC1&displaylang=en

When I tried to interact with it, I got an error message that the .NET Compact Framework 2.0 was missing on the pocket PC.

So I installed the .NET CF v2.0 SP1 found at http://www.microsoft.com/downloads/details.aspx?familyid=0c1b0a88-59e2-4eba-a70e-4cd851c5fcc4&displaylang=en and it updated both the local machine and the Pocket PC.

However, now when I use my local SSMS to talk to the SQL Server Mobile Engine, I keep getting the error:

Microsoft SQL Server 2005 Mobile Edition and/or .NET Compact Framework v2.0 is not properly installed on your mobile device or the device is not responding. (SQL Server Mobile Edition ADO.NET Data Provider)

(Now I know I can communicate with the Pocket PC because I browse out to it first)

Am I missing something more fundamental, or does this not work with a non-RTM framework?

View 1 Replies View Related

SQL CE 2.0 And SQL Mobile 2005

May 10, 2006

Hi,

I would like to know if we can install both versions of mobile SQL (SQL CE 2.0 and SQL Mobile 2005) on the same PDA. I know that two versions of CF .Net can be installed.

Indeed, I have an old CF .Net 1.3 application connecting to a SQL CE 2.0 database and a new one using CF 2.0 and SQL Mobile 2005. The first one will be migrated but in the future ... Meanwhile, the customer wants to run the two applications without any code modification.

Is it technically possible ? Is it recomended ?

Thanks in advance for your answers.

View 1 Replies View Related

Connecting To SQL Mobile Within VS-2005

Jun 15, 2006

I am getting an error when I run my project within VS2005. I am
trying to connect to a SQL Mobile (sdf) file thru code using a
connection string. As soon as run my project within the VS2005
environment, I get the following error when the code tries to connect:



"The file is not a valid database file. An internal error has occurred. [,,,Databasename,,]"



The source of the error is: Microsoft SQL Server 2000 Windows CE Edition

Native Error of: 25011

I am am deploying to POcket PC 2003 SE Emulator.



This code worked fine in VS2003 with SQLCE 2.0. But I have now
updated the projects to VS2005 and recreated the database sdf file
within the VS2005 environment.



Could someone please help me ASAP?

Thanks.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved