Compact Sql Mobile 3.0 DataBase In C++/OLE DB ?

Jan 2, 2006

Hello,

I'm porting my C++ (EVC3) application from Sql CE 2.0 to Sql Mobile 3.0
(with OLE DB). To compact a 2.0 database, i used ISSCECompact interface.
But it doesn't exists with the new version. I've only found C#
and VB.Net samples in MSDN ...

Thanks in advance.

View 8 Replies


ADVERTISEMENT

Designing A Compact Database For Mobile Device

Apr 4, 2008

Hey guys,

So I started an SQL CE database for use inside a mobile application. I used SSMS to create a .sdf file (because if I let Visual Studio do it, SSMS can't open it because it will be version 3.5).

The reason I wanted to use SSMS is because I wanted to be able to design the database in design view, and populate it with initial information for the application to use. That means adding tables and rows.

The problem is, SSMS doesn't seem to have a design view available when working with CE databases. It also doesn't seem to have a feature for adding rows into tables. It's essentially as useless as VS2008 for designing my mobile database. It only lets me add tables, and I can't even do that visually in design view. I have to use those cumbersome forms.

Is there any way to design a CE database in design view? And add rows of data into tables? It feels like I'm overlooking something.

Note: I dont need to subscribe or publish the database. The mobile application just needs to use the database as a repository.

View 7 Replies View Related

Mobile Vs Compact - What Changed?

Apr 19, 2007

What really changed from SQL Mobile to SQL Compact besides allowing the database to run on any desktop? Is there a document somewhere explaining the differences, I did not see anything?



I just changed my development machine over to SP1 and wondered what code I should be changing.



I am filling the database from my C++ Desktop app using ADO using the OLEDB provider Microsoft.SQLSERVER.MOBILE.OLEDB.3.0 and using System.Data.SqlServerCe in my C# mobile app. Is that OLE provider valid with the new version or should it be *.COMPACT.3.1?



I thought there was now suppose to be some sort of automatic compaction, but I did not notice any new properties.



I would appreciate any insight into the changes.



Thanks,

Juan Foegen

View 4 Replies View Related

Help W/SQL Mobile To SQL Compact Edition

Aug 23, 2007

Hello

We currently use SQL Mobile and SQL Server 2005. We depend heavily on merge replication for data to the field handheld devices.

We are going to be starting some new projects and I was wondering about moving to SQL Compact Edition as the first step to migrating all of our applications.

I am concerned, however, about the server side and replication. If we simply deploy SQL Compact Edition will there need to be any changes to the server for replication?

Thanks,
- will

View 4 Replies View Related

SQL Mobile Vs SQL Compact Edition

Jan 18, 2007

I have not seen much info on this so I thought I would ask the forum. I have VS2005, no SP1 and SQL Mobile installed on my computer. I started developing an app for Windows Mobile 5 using RDA and it appears to work fine. Now I want to know what happens to SQL Mobile if I install SQL CE. Is it going to affect my app? Do I have to install the SQL CE merge replications tools for IIS again? I already have them for SQL Mobile? Will this affect the operation of my app? It looks like the installation procedures call for installing SQL CE tools to VS2005 before installing VS2005 SP1 then install VS2005 SP1 and finally install SQL CE tools for VS2005 SP1. Any help, thoughts or experiences involving this would be appreciated.

View 3 Replies View Related

SQL Mobile Restricted Error - Using Compact!

Mar 27, 2008

Just released small piece of software with SQL Compact Edition, version 3, dll files distributed with the application.

Now feedback from 2 people suffering an error message as follows:
SQL Mobile usage is restricted on this platform. To use SQL Mobile, you must install SQL Server 2005, Visual Studio 2005, or the Tablet PC SKU.

Both using XP under Admin accounts.

My own testing did throw up this error prior to release, but only when I tried to run the program as a Limited User. I was unable to find out why. Running the program under an Administrator account never produced this error message.

The test-bed was a fresh install of XP, SP 2, running within VMware. An Administrator account was set up. No development software was installed, nor anything to do with SQL. I tried to make it a clean environment to be used by a non-technical user.

Any insights would be most appreciated.






View 8 Replies View Related

How Do I Compact SDF With SQL Mobile 3.0 OLEDB Provider With VC++

Aug 26, 2006



The interface ID IID_ISSCECompact has been removed from ssceoledb30.h thus causing a compile error on this statement:

hr = m_pIUnknownProv->QueryInterface(IID_ISSCECompact, (void **) &pISSCECompact));

So how does one compact a database using the 3.0 OLEDB Provider and VC++?

Thanks

JEK



View 1 Replies View Related

SQL Server Compact/Mobile Edition Versions

Mar 12, 2007

I am confused about the version numbers for SQL Server Compact/Mobile. It _looks_ like the versions went from CE 2.0 to Mobile 2005 to CE 3.0 (or 3.1). Is this correct? In fact, I found one location the specifically said Compact Edition is the next version of Mobile. In another location I saw Compact Edition referred to as 2005 CE.

This has got me going because I am creating a Mobile/CE app and I keep getting a "Initialize SQL Server Reconciler" and the best information I can find indicates a mismatch between the server component and the client component.

So, what are the current versions of Mobile/CE? Is there a location that lists all of the components and what version they should be?

Thanks.

Chris Mecum

View 5 Replies View Related

Creating A Mobile Application With SQL Server Compact Edition

Jun 28, 2007

Hello!!



I completed that example that I pasted in the subject part and when I try to synchronize my mobile database, the data from the server appear in my pocket pc; but when i refresh the data on my pocket pc they do not show on the server.



Can anyone give me a hand?



thanks

View 3 Replies View Related

Deploying SQL Server Compact 3.5 On Windows Mobile Problems

Dec 24, 2007

I've been trying to create an installer for a little .NET CF 3.5 app I've written for Windows Mobile. It uses SQL Server Compact 3.5.
I've got the .NET CF and my program to deploy on the device using ini files and ceappmgr.exe, but when I try to do the same for SQLCE 3.5, it doesn't work (more on this in a sec).

I need my installer to install across lots of different CPU architectures, so I created an ceappmgr INI file that includes all the different cabs for the different CPU architectures.
I'm trying to test the installer by making it install on my smartphone (ARM CPU). The problem is, when I install it I get an error message on the device "The installation file is not intended for this device.". I reckon this means ceappmgr is picking the wrong cab file and trying to make my phone install it!

I did a bit of testing and found out if I remove all the cabs from my ceappmgr INI file EXCEPT for the one that is appropriate for my smartphone, then it works fine! But as soon as I include a cab file that is not appropriate for my device (eg a different cpu architecture, or the ARM PPC cab file), it stops working and I get that "not intended for this device" message.

My INI file looks like this:


[CEAppManager]
Version = 1.0
Component = SQL Server Compact 3.5

[SQL Server Compact 3.5]
Description = Microsoft SQL Server Compact 3.5
CabFiles = sqlce.phone.wce5.armv4i.CAB,sqlce.wce5.armv4i.CAB,sqlce.ppc.wce5.armv4i.CAB,sqlce.wce5.mipsii.CAB,sqlce.wce5.mipsii_fp.CAB,sqlce.wce5.mipsiv.CAB,sqlce.wce5.mipsiv_fp.CAB,sqlce.wce5.sh4.CAB,sqlce.wce5.x86.CAB


Any idea why ceappmgr would be (seemingly) picking the wrong cab file and trying to make my device install it?
Btw, my smartphone uses the "sqlce.phone.wce5.armv4i.CAB" cab file.

Cheers in advance.

View 3 Replies View Related

VS2005sp1 Deploys SqlServer Mobile 3.0 Instead Of Compact Edition CABS

Jan 23, 2007

Hello

installed:

VS2005 Sp1

SSCE31VSTools-ENU.exe

SQLServerCE31-EN.msi



When creating mobile project in VS2005 it automaticaly adds reference to System.Data.SqlServerCe,



version: 3.0.3600.0

path: C:Program FilesMicrosoft Visual Studio 8SmartDevicesSDK\SQL ServerMobilev3.0System.Data.SqlServerCe.dll



instead of: C:Program FilesMicrosoft SQL Server Compact Editionv3.1SDKinwce400System.Data.SqlServerCe.dll

version: 3.0.5300.0



When creating desktop solution I don't have this problem.



Please help!

Thanks

View 5 Replies View Related

I Can't Seem To Find Which SQL Server Compact Edition Version Is Pre-installed On Windows Mobile 6

Dec 9, 2007

Hi,
I can't seem to find which SQL Server Compact Edition version is pre-installed on the Windows Mobile 6 rom.
I guess it is 3.0, but I'm not sure about it.
Another question is, if I use SQL Server Compact Edition 3.5 by deploying the .dll files as part of my application's CAB installer, will this be a problem for Windows Mobile 5 or Windows Mobile 6?
Thank you in advance,

View 4 Replies View Related

Access SQL2005 MOBILE Database In A VS2003 Mobile App

Mar 6, 2006



It is possible to access a Sql Server 2005 Mobile database in a VS2003 application (compact framework) ?

Thanks

Robson

View 4 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

Difference Of Compact Edition And Mobile Edition

Aug 19, 2007

Hello


I recently downloaded the sql mobile edition, and then I found out about the compact edition.

I understand that these are relational lite version of sql server that can run on mobile devices.

However, what is the difference between the CF and mobile edition? Why should I choice one over the other?

I have just heard about sql everywhere, seems there are all these edtions and how would you choice the right tool for the right job?

Many thanks if someone could explain further,

Steve

View 1 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 Server Mobile Parallel To SQL Server Compact?

Nov 24, 2006

Hi,

I'm a bit confused about the editions. Will SQL Server Compact v3.1 be a successor of SQL Server Mobile v3.0 (but with desktop and mobile targets) or will the two editions coexist with SQL Server Mobile on Smart Devices and SQL Server Compact on desktop PCs?

I'm drawing this conclusion because the CTP & now also the RC1 of SQL Server Compact are only compiled for desktops (and I've also seen that the .NET library is compiled against .NET Framework 2.0 desktop edition). If I'm wrong, why are no smart device CABs provided?

My second question:
Is the file format of SQL Server Mobile & Compact the same? Can I create a SDF file with the Compact Edition on the desktop, move it to the smart device and use it there with the "older" Mobile Edition? I'm asking, because we are starting a project where we need to create a SDF on the desktop, because of performance reasons.

 

Thanks in advance,
Klaus

View 5 Replies View Related

Mobile Edition Vs. Compact Edition

Dec 11, 2007

Hello,
there are some limitations in SQL Server 2005 Mobile Edition - e.g. there is no TRUNCATE TABLE statement, the UPDATE .. FROM clause is not allowed etc. Are these limitations in Compact Edition too? Is T-SQL in these editions functionally equal or different? Is there any comparison of T-SQL features in both editions?

View 5 Replies View Related

Compact Edition, Mobile Edition, Or Something Else On CE 4.2?

Oct 5, 2007

I'm currently looking at adding a database to my company's WinCE 4.2 -based device, running applications coded with embedded CE 4.0. We want to start tracking potentially large quantities of user data (10K-30K 500 byte records) and are looking at a database engine to support this. The database would reside on the device although we would potentially dump the data from the devices to a central workstation that would be used to pull reports about the data across multiple devices. SQL Server Compact Edition sounds like a possible solution, but I'm unclear if it's supported on CE 4.2 or how to install it if it is. It's clearly supported on CE 5.0, but it may be a while before we upgrade to CE 5.0 or 6.0. I've seen references that say that SQL Server Compact Edition is the same as SQL Server Mobile Edition, and references that Mobile Edition is supported on CE 4.2, but I'm unclear if I can install and use SQL Server Compact Edition on CE 4.2 or if I'm on a wild goose chase. If not, can I use SQL Server Mobile Edition and migrate to SQL Server Compact Edition when we upgrade CE to 5.0 or 6.0? If not Mobile Edition, what about Microsoft SQL Server CE 2.0? Is that going too far back in the archives?
Thanks for any guidance/enlightenment you can offer.

View 7 Replies View Related

How I Imported My SQL Database Entities Into My SQL Compact Database

Nov 29, 2006

Hello:

I am still working on my project, but figured I would share my findings with the community, on how I imported my SQL Server database tables into a new SQL Compact Edition database. Unfortunately, I haven't figured a workaround to the IDENTITY_INSERT issue, but other than that, I will proceed.

1) I downloaded and played with the tool presented in the article "Generate SQL Insert statements for your SQL Server 2000 Database" I made the following modifications . (my modification can be found here)
a) Disable scripting dependencies
b) Add a filter for objects to script
c) Prompt for each table from which to export data

2) From the scripts output by this tool, I had to (which I may integrate into the tool later... who knows)
a) Remove 'On Primary' statements after the create table statements.
b) Remove date defaults.
c) Most other SQL generated by the tool seemed to work.

3) Execute each 'Create Table' statement individually.

4) For the Data Import, I had to add semi-colons to the end of each Insert Line.

5) I Have found no workaround for the IDENTITY_INSERT issue. If anyone has a good idea, I would love to hear it. In my case, I was importing the DotNetNuke core store module tables populated with about 2500 products and 20+ categories consisting of a simple categories table and products table. I imported the categories table into a fresh MS Access database file, and then ran the update query against the attached products table in the original SQL Database, then regenerated the insert statements, and imported the data generating fresh product ID's. This database will only be read only, so it didn't matter about maintaining the Product ID's, just the relationship between the products and categories.

Separately, I found a great blog article on how to embed a SQL script as a resource for your application and run it on your applications first run, so my steps above would provide a quick foundation for generating that sql script.

 

View 3 Replies View Related

Question: Can I Synchronize The Mobile Device Which Has A SQL Server CE Database With The Access Database On The Desktop?

Sep 26, 2006

Dear All,
i have a question abt winCE 4.2 and SQL server CE.
i am using VB.net of Visual Studio 2005
My platform is using a PDA with winCE 4.2 and SQL server CE. The Host program is using dbf files on desktop side.


I got a problem of how to sync / read the sql CE data from a windows application.

so, i wanna ask,

1. any method to access the data from winCE data by windows application? or can i convert the sdf file to windows readable files? or any others?

2. Can i use a MDB to sync with SQL server CE?
can i synchronize the mobile device which has a SQL Server CE database with the Access database on the desktop?

last question,
3. is that windows CE .net 4.2 not support pocket access (cdb) anymore?

please help me out

View 1 Replies View Related

Upgrading Sqlce 2.0 Database To Sql Server For Mobile Database On Desktopn

Oct 23, 2007

can we upgrade a sqlce forgotten password database to sql server for mobile database on our desktop


Thanks & Regards
Mukesh Gupta

View 1 Replies View Related

Database Compact?

Feb 11, 2007

Hi,
I am wondering why a database that was 2Gb in size would come down to just 300Mb when I copy all the data from the origional database into a blank new one.
I ran a database shrink on the origional database but that only reduced it from 2.1 Gb to 2Gb.
I was shocked to see the size difference when I copied the data.
As far as I can tell the copied database still contains all the records of the origional.

I remember that MSAccess had a Compact function that literally copied all the data from one databse into a new empty one - is there the equivalent for SQL?

Any thoughts?

Thanks

View 8 Replies View Related

Compact Database

Jul 20, 2005

Is there a stored procedure that allow the compact database programmaticallyin SQL Server?

View 2 Replies View Related

Compact.database

Nov 20, 2007

Here's the Active X Script I'm trying to migrate into an SSIS task:


Function Main()
Dim Engine, dbPath

dbPath = "c:path..."
Set Engine = CreateObject("JRO.JetEngine")

Main = DTSTaskExecResult_Success
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath &

"database_UnCompress.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath &

"testdatabase.mdb"
End Function


I have problems in migrating. Here are the questions:
1. Is the ShrinkDatabase task the SSIS equivalent of this script? If so, I'm having problems creating a new connection since it is an mdb file stored on local computer and not on a server. Is there a workaround on this?
2. If I have to use the script task, I use this codes:

Set Engine = CreateObject("DAO.DBEngine.35")
Engine.CompactDatabase "C:.path...database_UnCompress.mdb", "C:path... estdatabase.mdb"
or

Set Engine = CreateObject("JRO.JetEngine")
Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=pathdatabase.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=pathcompacted_database.mdb"
Both produce the same error: Option Strict On disallows late binding. Any suggestions?

3. I also tried to use the Execute SQL Task, using dbcc shrinkdatabase. But I seem lost again in creating a connection. Should I consider "database_UnCompress.mdb" as flat file source?

Any help deeply appreciated. Thanks.

View 9 Replies View Related

Compact And Repair Database

Aug 17, 2004

I'm an Access man moving towards SQL Server and I'm interested in knowing if there is a utility for my SQL Server version 7 database that is similar to Access' Compact and Repair utility? I'd like a recommendation from a guru on what Prevenatative Maintenance measures I should be running daily/weekly/monthly etc...

Thanks in advance.
dog

View 3 Replies View Related

Compact And Repair Database ?

Aug 29, 2006

I want to use function "Compact and repair database" in SQL Server2000 which like function Access 2003.
How can i do ?
Thank you very much.

View 2 Replies View Related

Access To A SQL Compact Database With ADO

Sep 28, 2007

I want to access to a SQL Compact database with an application develope with Visual Basic ans using ADO (not ADO .Net). Is it possible and how ?
Thank You.

View 1 Replies View Related

SQL Server Compact Database..

Jan 4, 2008

Hi,

I am new to SQL Mobile developement and trying to developing a small device appliction. My C# code is shown below. My code is executing correctly, but i am not able to see the inserted records in to my SQL Compact database. What i am doing here? Please help.

FYI, I have added the database in to my solution. My solution and database resides in E:\some directory, where as the my assembly code base represents the datasource as \ProgramFilesMobExpTrackerMobExpTracker.sdf.


SqlCeConnection connection

{

get

{

if (_connection == null)

{

_connection = new SqlCeConnection(ConnectionString);

_connection.Open();

}

return _connection;

}

}

string CurrentFolder

{

get {return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);

}

}

const string databaseLocalFileName = "Northwind.sdf";

string DatabasePathName

{

get { return Path.Combine(CurrentFolder, databaseLocalFileName); }

}

const string BaseConnectionString = "Data Source=";

string ConnectionString

{

get { return BaseConnectionString + DatabasePathName; }

}


const string sql =

"INSERT INTO mobexptracker(ExpenseDt,ExpenseDescr,ExpenseAmt) VALUES (@ExpenseDt,@ExpenseDescr,@ExpenseAmt)";

const string sql1 =

"SELECT COUNT(1) FROM mobexptracker";



private void btnSave_Click(object sender, EventArgs e)

{

bool savesucess = Save();

if (savesucess)

{

MessageBox.Show("Expense Saved Sucessfully!");

}

else

{

MessageBox.Show("Error!");

}

}


bool Save ()

{

bool success= false;

using (SqlCeCommand cmd = new SqlCeCommand(sql,connection))

{

cmd.Parameters.Add("@ExpenseDt", txtDate.Text);

cmd.Parameters.Add("@ExpenseDescr",txtExpDesc.Text);

cmd.Parameters.Add("@ExpenseAmt",txtExpAmount.Text );

int cnt = (int)cmd.ExecuteNonQuery(); // ExecuteScalar();

cmd.

success = cnt > 0;

}



return success;

}



View 7 Replies View Related

Compact Sqlce Database

Apr 26, 2007

Hi, there;

I got a SqlCe2.0 database here called JOB.sdf, size is 260K. When I tried to compact it, it took very long and that JOB.sdf.tmp was created with 27.7M!!!, I can still open table in the database, but I found that there is some invalid data (unreadable square boxes). It looks like database was corrupted. My application gave error:

Error Code: 80040E14
Message : The OLE DB Execute method failed. The SQL statement is not valid. [,,,SQL statement,,]
Minor Err.: 28560
Source : Microsoft SQL Server 2000 Windows CE Edition
Error Code: 80040E14
Message : Line 1: Incorrect syntax near 'à Ã§¼‚¬Ã©€™€°Ã¬±´ÃªÅ ®Ã£¶»Ã¤¡Æ’ꢀ¹Ã¨Å¸¬Ã£³Å¡'.
Minor Err.: 170
Source : Microsoft OLE DB Provider for SQL Server
Error Code: 80040E14
Message : Unclosed quotation mark before the character string 'à Ã§¼‚¬Ã©€™€°Ã¬±´ÃªÅ ®Ã£¶»Ã¤¡Æ’ꢀ¹Ã¨Å¸¬Ã£³Å¡'.
Minor Err.: 105
Source : Microsoft OLE DB Provider for SQL Server</E>



Note: " " is displayed as "SOHSOH....." with black background.



Apart from compacting database, is there manual job or tool we can do/use to fix a corrupted database caused by power failure? (e.x: all data saved successfully before power failure)?



Thanks

View 6 Replies View Related

Zero Out SQL Server Compact 3.5 Database

Feb 22, 2008



I have an application that uses a SQL Server Compact 3.5 database backend. Everytime the application starts I want to zero out my database, meaning remove all records and reseed all identities. This datatbase is then filled based on a directory structure. Once this DB is filled I then send the entire database to a Windows Mobile PPC device via 802.11g WIFI. Before sending the database I first create an MD5 checksum on both the server and client sides to see if the database actually needs to be transfered. If the checksums match I will not send it as the client already has the lastest copy.

My problem is that I can never count on the database identity values starting at the same number on any particular instance of the application so the checksums are usually different. To solve this problem I need to ensure that everytime I start my server application the database (and all identifiers) will always be the same, will always be as if I just creaed it. How do I do this?!?!?!? This seems like it would be a trivial operation as I can imagine its use in multiple situations. Anyone know how to zero out the database?

View 1 Replies View Related

How To Connect To Compact Edition Database

Dec 18, 2007

I need to create a desktop program on vb.net , based SQL compact edition. but I do not know how to connect to CE database. I already create the sdf file, but I can not connect it from the poject , is there any way to do it ?

View 1 Replies View Related

Compact Database Error Code: 0

Jan 9, 2006

I am currently working in VB.NET with SQL Mobile 2005.  I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring).  When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database.  The code works however it only seems to work for smaller databases.  Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

View 8 Replies View Related







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