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


ADVERTISEMENT

SQL Server Mobile Merge Replication Walkthrough, Cant Find The .NET Framework Data Provider For SQL Server Mobile Edition.

Sep 9, 2005

Hi,

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

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

SQL Server 2005 Mobile Edition Vs. RMS

Apr 6, 2008

Hello,

I am developing a mobile application in which i have to create a database..

My database contains relationships between its tables..
I would like to know what is the best solution for developing the database?? SQL mobile edition or RMS!!!

If you say RMS, how should i create the relationships between my tables??

thnx

View 1 Replies View Related

Update Sql Server 2005 Mobile Edition

Jun 5, 2006

I have use this guide to make a application for windows mobile 5.0. http://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/VS2005pro/Smart_Client/DataBinder.htm Everything is work. I can add, remove data in the dataset. But i can't update the sql server database. can somebody tell me whats wrong? Nitro.

View 4 Replies View Related

Does SQL Server 2005 Mobile Edition Exist?

Dec 13, 2006

"SQL Server 2005 Mobile Edition" is a standalone software?

or

it equals "SQL Server 2005" + "SQL Server 2005 Mobile Edition Device SDK"?

View 6 Replies View Related

SQL Server 2005 Mobile Edition Free?

Jun 4, 2006

Hello

I have a question: is the SQL Server 2005 mobile edition free? or is it necessary to buy a licence when i use it combinated with a comercial program which i have delevoped by myself and i sell it?

greetings

stefan lederer

View 1 Replies View Related

SQL Server 2005 Mobile Edition - Binaries For The Tablet PC -Where Are They?

Nov 15, 2006



Where can I find the SQL Server 2005 Mobile Edition binaries for the Tablet PC?

Thanks

JEK

View 4 Replies View Related

Creating Reports On SQL Server 2005 Mobile Edition

May 10, 2006

I am looking for a reporting software to create reports (Invoices, Receipts) for PocketPC 2003 using Visual Studio 2005 and SQL Server 2005 Mobile Edition.
Any recommendations will be appreciated.

Thanks, Alla

View 3 Replies View Related

Creating SQL Server 2005 Mobile Edition On Desktop

Dec 17, 2005

Hello Everybody

I want to create SQL server 2005 mobile database on desktop programmatically with some inital data for my application and load it into device. We can create database only in VS2005 server explorer or SQL server 2005 application.

Anybody having this solution for this prob.

 

Regards

Chikuu

 

 

 

View 7 Replies View Related

Memory Usage Of SQL Server 2005 Mobile Edition

Jan 2, 2007

Hi forum readers,

we are working on a release 2.0 mobile solution right now. In our version 1.0 we did not have to worry about memory issues as our application was the only application running on our target devices (e.g. T-Mobile MDA Compact II Pocket PCs, WM2005).
Now we need to share the available memory with others. As our application relies on its SQL Server 2005 Mobile Edition database we are wondering about memory usage of that server.

We know that a Pocket PC divides its memory into Storage and Program. If our application uses a 5 MB database and 1.5 MB for DLLs and it's exe-file. These files reside in the storage space when not loaded. When the application starts up it is loaded in the program memory. What happens to the 5 MB database file? Is is loaded into Program memory as well? Are only portions of that file loaded? Or is nothing loaded at all?

Does anyone have a deeper insight into that server an can answer my questions.

Best regards,
Tobias

View 3 Replies View Related

SQL Mobile Server 2005 To SQL Server Developer Edition 2000

Oct 30, 2006

I am looking for a detailed tutorial that explains how to set-up merge replication services for a major project. I have seen all of the claims that SQL Mobile Server 2005 is able to connect to a merge publication with SQL Server 2000. However, where are the tutorials? I must have a proof of concept in a few days to quote this project. Can anybody help with this issue? Thanks!

View 1 Replies View Related

Mobile Solution With SQL Server 2005 Express Edition And Smartphone

May 7, 2007

Hi,i want to create a solution which shall consist of a sql server 2005 -data base (express edition if the following features are available byexpress edition) and a mobile windows application (running on asmartphone under windows mobile 5.0).The sql server shall be installed on a ordinary laptop using windowsxp (not professionall edition).Which would be the best way to exchange the data between mobile deviceand pc? I learned that there is a SQL Server Compact Edition for themobile device and that rda would be a way to exchange data - but theni would need internet information system and this does not run on xphome edition.Which alternatives would you suggest me?Thanx in advanceWolfgang

View 4 Replies View Related

How To Import Data Into SQL Server 2005 Mobile Edition Database?

Jan 5, 2007

There are any import/export utilities for SQL Server 2005 Mobile Edition database? Which edition of SQL Server 2005 can do this?

Or we must use publication/subscription to transfer data to the mobile database?

Thank you for your help!

View 6 Replies View Related

SQL CE 3.0 SQL Server 2005 Mobile Edition Database Password Problem

Dec 5, 2006

Hi,

I was wondering if someone could help me as this is a bit of a puzzle.

I have created a database using a password, the create table scripts are executed successfully using the connection string however when I try and use the same connection string to insert some data into the database an error is produced, with the following message 'The specified password does not match the database password'.

I have opened the database using the SQL Server 2005 Management Studio and provide the password and I can access the database without a problem.

When the connection object is first instantiated all the Connection String property, the connStr variable and the modifiedConnStr are all correct (by this I mean that the data source and the password are present). However when the connection object is accessed again the Connection String property and the connStr variable are both set incorrectly (by this I mean that the password= section of the string is missing) however the modifiedConnStr is set correctly (by this I mean that the password= section is present in the string).

The connection object does not get set in between creating and accessing the connection object.

I have resorted to using no password, however I really need to be able to use a password.

Here is a copy of the connection string I am using (Copied directly from the quick watch window):

"Data Source = '\Program Files\Application\DataBase\MyDatabase.sdf'; password="Pa55word";"

I am sorry this a little long winded however I would like to provide as much information as possible. I hope someone can help me with this problem.

Thank you for reading.

Paul Diston

View 4 Replies View Related

SQL Server 2005 Mobile Edition Using Server Tools

Jan 20, 2007

I have installed SQL Server 2005 Mobile edition and also the server tools.

I configured a website to sync with my mobile application. When I go t check the SQL server Mobile agent with this url:

http://localhost/MobileTest/sqlcesa30.dll i get a http 500 internal error

I am using remote desktop to access the machine, when I am directly on the machine there is no error I get the correct message in the browser

"SQL Server Mobile Server Agent 3.0"

Is access to the web site via remote desktop a problem?

jawahar

View 1 Replies View Related

Query Performance Issue Of Sql Server 2005 Mobile Edition On Device

Jun 28, 2006

Executing a select query with left outer joins etc takes .53 seconds to execute on sqlce 2.0.

Same query on sql 2005 mobile ed. takes 11 minutes .

on database having same data.

Sample query

SELECT routes.location,routes.equipment_type, routes.contract_type,

routes.maintenance_interval,routes.bank_description,routes.Unit_Des,

routes.Unit_no,max(task_last_completed.date_completed)as date1,min(case when

task_last_completed.due_date is NULL then getdate()-1 else due_date end) as

due_date FROM routes left outer join tasks on tasks.model = routes.model and

tasks.eqtyp = routes.equipment_type inner join task_by_contract_type on

tasks.task_id = task_by_contract_type.task_id and

task_by_contract_type.contract_type = routes.contract_type and

task_by_contract_type.model = routes.model left outer join

task_last_completed on routes.unit_no = task_last_completed.equipment_Id and

tasks.task_Id = task_last_completed.task_Id WHERE routes.location LIKE

'S153825-01%' group by

routes.location,routes.equipment_type,routes.contract_type,routes.maintenanc

e_interval,routes.bank_description,routes.unit_des,routes.unit_no ORDER BY

routes.location, routes.bank_description, routes.Unit_Des

WHY????????????????

View 4 Replies View Related

Updating SQL Server 2005 Mobile Edition From Command-line Program

May 16, 2007

Is here any way to update Mobile database from command-line program that ie;

reads sql commands from text file, run query analyzer, insert readed data to SQL tab and deploy these commands?

Or any other way to do this?

View 3 Replies View Related

SqlCeConnection Failing To Open A Connection To The SQL Server 2005 Mobile Edition

Apr 15, 2008

Good day,

I am writing an application using VB.Net 2005 for the Windows CE 5.0 device and it is connecting to a SQL Server 2005 Mobile Edition Database.
The trouble I'm having is establishing a connection to a SQL Server Mobile database on the device.

Here is the code I am using:




Code Snippet
Public gConnectionString As String = "Data Source=Program FilesMobAppMobDB.sdf;Persist Security Info=False;"




Code Snippet

Imports System.Data.SqlServerCe

Public Class DBManager

Public Shared gSQLCEConnection As SqlCeConnection


Public Shared Function OpenDB() As Boolean

If gSQLCEConnection IsNot Nothing Then

Throw New InvalidOperationException("Connection already open.")
End If
gSQLCEConnection = New SqlCeConnection(gConnectionString)
Try

gSQLCEConnection.Open() 'Error occurs here
Return True
Catch ex As SqlCeException

MsgBox(ex.Message & vbCrLf & ex.HResult & vbCrLf & ex.NativeError & vbCrLf & ex.Source)
Return False
End Try
End Function


In the immediate window I recieve the following messages:


A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll


I believe that the first few lines are caused by the icons/pictures that I have included with my app, but the SqlCeException line occurs when the connection to the .SDF file is trying to be established.

Here is the exception output:

Message: "" (Blank)
HResult: -2147024882
NativeError: 0
Source: SQL Server 2005 Mobile Edition ADO.NET Data Provider

Programs under Remove Programs on the PDA are:
Microsoft .NET CF 2.0 ENU-String R...
Microsoft .NET Compact Framework...
Microsoft SQL Client
Microsoft SQL Mobile 2005
Microsoft SQL Mobile 2005 [EN]
Microsoft SQL Server 2005 Compact...
Microsoft SQL Server 2005 Compact...
Microsoft SQL Server 2005 Compact...
Microsoft SQLCE 2.0
Microsoft SQLCE 2.0 Dev

Any ideas on what could be stopping this connection from being established? It was working before but all of a sudden just stopped. I have warm booted, cold booted, and rebuilt with no luck and also checked that SQL Query Analyzer is not running on the PDA and that the connection string is valid.
The call to OpenDB occurs in the form_load of the startup object.

Thanks in advance,

Leon

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

Cannot Build SQL Server Mobile Solution For Windows Mobile 5

May 18, 2006

Using MS VS 2005 (incl SQL Server Mobile)
MS Pocket PC 2005 SDK

I am working on a project that builds for Pocket PC on both Mobile 2003 and Mobile 5. The project uses/will use SQL Server Mobile to store local data.

Project created from new with support for both platforms. I include required header files ssceerr30.h and ssceoledb30.h.

Project builds fine in WM2003 configuration, release and debug.

When I build for WM5 the compiler cannot find the header file transact.h. This is included from within ssceoledb30.h. Same as under WM2003.

In WM2003 configuration if I highlight the ssceoledb30.h include in Visual Studio and open the header, it takes me to <Visual Studio dir>SmartDevicesSDKSQL ServerMobilev3.0. I then locate the include for transact.h and do the same, which takes me <Visual Studio dir>SDKPocketPC2003include. The file exists.

If I repeat the above 'browsing' under the WM5 configuration, ssceoledb30.h takes me to a different copy in the WM5 SDK directory. There is no diff between the file here and the other copy used by WM2003. If I attempt to open transact.h - file does not exist.

Fix (which I'm not too sure about, i.e. is it OK?) - If I copy transact.h to the WM5 SDK directory, the project builds.

Why has transact.h disappeared from WM5 SDK?
I can find no ref's to this problem anywhere. Is my installation of the WM5 SDK corrupt? What else could I be missing?
Is there a sample for SQL Server mobile (like the NorthwindOLEDB sample) that comes configured to build for WM5?

View 1 Replies View Related

SQL Server Mobile Tutorial And Getting Proper Mobile DB Installation

Apr 24, 2006

Hi folks, I'm new to Windows Mobile progamming, and new to this forum. Apologies in advance if I'm asking a boneheaded question, but I've done searches and can't find anything directly applicable to my problem.

I'm currently walking through the published MS tutorial in setting up an SQL Server 2005 Mobile application that subscribes to a publication on SQL Server 2005 to exchange information.

I've gotten almost all the way through... successfully set up the server components, creating the publication, etc. On the mobile side, I've been able run the cab files to install the SQL Mobile components and to create the project, add the reference to the dll, and instantiate an engine object. It compiles.

The step in the tutorial after that, though, where you specify the data source from the "data" menu, I've got a problem. When I try to use the "new connection" dialog from choosing the data connection, "MS SQL Server Mobile Edition" doesn't show up as a choice. I've tried choosing any of the other combinations, and in teh subsequent "Connection properties" section my database, SQLMobile (as in their sample) is available, but I get an error when I choose it and click OK. Clicking on "Test Connection" gives me a connection successful message.

My guess is that something about the Mobile server side components is not installed correctly on my development machine, but honestly I have no idea how to begin to fix it. Has anyone seen this problem before and know how to resolve it?

Your time and any knowledge sharing is greatly appreciated.
Thank you,
-Dana

View 8 Replies View Related

Isqlw For Sql Server Mobile Edition (sql Ce 3)

Jan 23, 2006

In sql ce 2.0 in window ce 2003, I use isqlw20.exe to create database and table. Developed application with eVC++ 4.0

Now I have to use window mobile 5, VS 2005 for native C++ development, sql server mobile edition, but I can't found isqlw for this version of sql. I do not have sql server install in my desktop PC. So how could I create database and table with the pocket pc's database ?

Thanks.

View 1 Replies View Related

Creating A Mobile Application With SQL Server Mobile - FIX

Jul 21, 2006

This is a great tutorial and it's a shame one of the more important steps was missed.
In the €œCreate the snapshot user€? section you you find the steps to create the snapshot_agent account. Then in the €œCreate the snapshot folder€? section you find the share and folder permissions. However, at no point do the instructions advise you about adding the snapshot_agent to the SQL Server Logins. The result is that agent cannot perform the initial snapshot but you won't find this out until 50 steps later after Step 10 in the section  €œCreate a new subscription".
 
To get back on track, openthe Object Explorer's Security section and add the snapshot_agent to your logins. Then using the "User Mappings", set an appropriate level for the SQLMobile database role. Once completed you then need to run the agent.
 
Right-click the SQLMobile publication you created and select "View Snapshot Agent status". From that dialog you can select "Start" to run the agent. When it completes, you can return to the tutorial section "Create a new subscription" and continue with the tutorial.
 

 

View 4 Replies View Related

Creating A Mobile Application With SQL Server Mobile

Nov 3, 2007

I am studying the tutorial in SQL Server 2005 Mobile Edition Books Online, and the topic is Creating a Mobile Application with SQL Server Mobile. I have got a problem when creating a new subscription after created a new SQL Server Mobile database. And the problem is shown below:

New Subscription Wizard

- Beginning Synchronization (Success)

- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)

* 無法完�作業。


- Finalizing Synchronization (Stopped)

- Saving Subscription Properties (Stopped)

Before I have met this problem, I have finished all the task. And I can browse the localhost web site by using anonymous account even I use internet explorer or browse the directly in IIS.

Does anyone can solve it?? Thank you very much~~~

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

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

How Do I Use The Crosstab Query In Sql Server Mobile Edition

Mar 1, 2006

I can use crosstab query(intersection table) in sql server.

for example :

CREATE TABLE [Test] (

[id] [int] IDENTITY (1, 1) NOT NULL ,

[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[subject] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,

[Source] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

INSERT INTO [test] ([name],[subject],[Source]) values (N'mike,N'math,60)

INSERT INTO [test] ([name],[subject],[Source]) values (N'tom',N'English',70)

INSERT INTO [test] ([name],[subject],[Source]) values (N'mike',N'france',80)

INSERT INTO [test] ([name],[subject],[Source]) values (N'jane',N'English',75)

INSERT INTO [test] ([name],[subject],[Source]) values (N'mary',N'france',57)

INSERT INTO [test] ([name],[subject],[Source]) values (N'tom',N'math',80)

INSERT INTO [test] ([name],[subject],[Source]) values (N'mike',N'Englist',100)

Go

--------

declare @sql varchar(8000)

set @sql = 'select name,'

select @sql = @sql + 'sum(case subject when ''+subject+''

then source else 0 end) as ''+subject+'','

from (select distinct subject from test) as a

select @sql = left(@sql,len(@sql)-1) + ' from test group by name'

exec(@sql)

But I cannot use it in sql server mobile editon.

HOw do I? thank you very much!!!

View 6 Replies View Related

Query: Master..sysservers In SQL Server Mobile Edition

Sep 25, 2007

Hi,

I have a program in VB.NET 2003 where I have query "SELECT COUNT(*) FROM master..sysservers WHERE srvname = '" & strServerName & "'". This program copies data from .MDF file to another .MDF file. This query is written since I have created linked server.

Issue 1:
But now I to copy data from .SDF (SQL Server Mobile Edition) to desktop .MDF file. For this I cannot fire the above query on .SDF file. What is the other alternative?


Issue 2:
In the existing prgram that copies data from .MDF to .MDF, I have created linked server. Can I do the same with mobile edition?

Regards,
MI

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

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







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