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.
I want to physically move my .SDF file to my desktop and then access this file from VS 2005 VB.NET. Ideally, I would want to access this .SDF file from MS Access 2003 but I undersand this is not possible.
Here are my VS 2005 VB.NET statements....
Dim ConnPPC As New System.Data.SqlClient.SqlConnection("Data Source = C:Documents and SettingsG014436My DocumentsSQL
MobileActMgr6CE.sdf")
Dim mySqlDataAdapter2 As New SqlDataAdapter("select * from T0002_AE_Activity_Entry", ConnPPC)
mySqlDataAdapter2.Fill(myDataSet2)
On executing the last statement(fill)...I get the following error.
function failed: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
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?
I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied." Any ideas? Thanks a lot.
Imports System.IO
Imports System.Data
Imports System.Data.SqlClient
Imports System.Math
Imports System.Drawing
Imports System
Public Class Form1
Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks"
Dim strQuery As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "Hello, Clicking after."
ReadOrderData()
End Sub
Private Sub ReadOrderData()
Dim queryString As String = "select * from Person.Address where AddressID < '10'"
Using connection As New SqlConnection(strConnection)
Dim command As New SqlCommand(queryString, connection)
connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader()
I have developed a C# desktop application which uses SQL express as its database. It works just fine as I installed the application, used SQL express Server Management Studio CTP to create database with tables , stored procedures etc.
Now, I want to create an installer that will not only install my application to other machines but also create the database with all the tables and stored procedures with it.
How do I do so? I searched the answer in several places but none worked out for me. Can anyone please help me on this??
For your convenience I'm giving the following informations:
Database name: NorthPoleSQL sever Name: IshtiaqueSqlexpress (used Windows Authentication Mode)
I have detached the database from the original machine and have the NorthPole.mdf and NorthPole_Log.ldf files. I want to use these files and create the database in target machine rather than writing sql scrips and executing them.
Please help me with a descriptive, step by step instruction as I am new to this technology. Thank you.
I want to create an application for home users which runs on their mobile device (smartphone) and their desktop PC and keeps the data synchronized between them. On their desktop I want to run either SSCE or SSExpress. There are so many options in the SSCE literature, which options should I use? How do I synchronize the data? The literature has so many options I don't know where to start.
We have a product which uses a SQL Mobile Database under Windows CE 5.0. I would like to be able to change the database structure, i.e. add tables, change table structure , etc. On a copy of the database on my PC and them move the restructured database back to a device. I can access the database from Visual Studio 2005. I can edit tables, add tables, but I can't change the name of a column. Does anyone have a solution?
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?
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.
Am trying to find a way to insert/update/delete data in a SQL mobile database on a Windows CE 5.0 device FROM a desktop PC.
This situation is completely stand alone, no network (apart form device/desktop), no GPRS etc etc etc.
I've looked at RDA but i dont believe it fits my app. (pulling data from a 2005 server that doesnt exist doesnt really help me much, push can't be used without a pull which kills the idea.)
The goal is a UI on the desktop that can manipulate data in the SQL mobile Database.
I've tried all i can find/think off in relation to this but to no avail.
My latest attempt has been using the simplest method possible (using a VS wizard datasource to the devices DB and tryign to whack that on a form) but this just creates a "Path not found. Check the directory for the database [Path = Mobile Device/ce_swipe/TestDB.sdf".
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.
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 [,,,,]
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.
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:
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.
Have two C# applications - one WinForms desktop app, the other a WinForms smart device app. Both use SQL Server Compact CE 3.5 to store data locally. Both work just fine.
Now the desktop app needs to open and update the .SDF file that is stored on the Windows Mobile device. (Device will be docked via USB.)
What format would the path to the .SDF look like that the WinForms application would need to specify in order to open it?
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.
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?
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:
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)
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.
Hi, I would create a vb2005 application that allow me to edit a sdf database stored into a pda connected at pc with activesyn directly on my desktop as well as "SQLCE Database View". How can i do it??
I hav emulator Windows CE 4.0 with Visual Studio 2003, C#.
I want connect to sql server 2000......after read all posts of this subject and try all varieties modes of connecting string.....in sql profile i see that application in emulator try to connect the sql server but i have the same exception :
I am dealing with an old ASP.NET 1.1 web app that I want to fix and update. The existing site has an SQL database on the web host's SQL server. I want to rip a complete copy of this database (it isn't large, only 9MB) onto my desktop computer, so I can alter it and "bench test" the changes I'm making to the overall application in VS2005.
Now, I have tried to yank a copy of this database and its structure using GUI programs like Visual Studio 2005, SQL Studio Manager Express, and EMS SQL Manager, none seem to offer a "Save As" option. While I can easily make changes to the database and its tables on the web host's server (sql.hostname.net) with no problem, I can't figure out how to pull a copy off of their server and onto my machine...
Does this problem have a very simple solution that I am overlooking?
I am thinking of using my web database as the database to use for my program, though not sure how feasible due to connection speeds and having to transfer that info.
what I am using as the connection string is
con.ConnectionString = "Data Source=databse ipadress inserted here; Initial Catalog=databasename here;Integrated Security=True"; with real data obviously inserted into the ip and tables, but when i try and send values there it just hangs and then crashes. I am thinking its not finding the database. Is there something else im to do?
I am using the exact same code as when i use my own machine as the server, and it works great that way, only thing different is the trying to send to the web server.
I am running 7.0 standard desktop on Workstation 4.0 and have run into a database size limitation of 10GB. I have all the newest patches and have found no documentation that refers to a 10GB limitation. A September copy of VBA developer says that this edition has a limitation of 4GB while the guides say that the Small Business Server edition would have a 10GB limitation. All other forms of documentation say that there should be the standard mega-terabyte limit. I'm completely confused by this [lack of] documentation. Any help???
The sample application provided with Access Database Synchronizer fires a "A request to send data to the computer running IIS has failed. For more information, see HRESULT." exception on my WinCE 4.2 device.
I debugged it with VS2005 to see what was going on and found that the problem resides in the line:
m_connDesktop.Pull("MSysObjects","SELECT Name FROM MSysObjects WHERE Type=1 and flags=0",accessSysConnectString,RDATrackOption.TrackingOff,"Err_MSysObjects");
It seems that connection m_connDesktop is ok but calling Pull method fails.
I've verified that SSEvAccessSync service is started when ActiveSync detects device connection and that firewall rules are correctly updated.
Also, i verified my System.mdw and i discovered that there is no "MSysObjects" table (only MSysGroupList, MSysGroupMembers, MSysUserList and MSysUserMemberships queries are there).
Do you think the problem is there?
How can i solve it without damaging System.mdw?
I cannot figure out what's the purpose of this line of code, can you help me?
I am writing a Desktop application accessing a SSCE database. I am running Windows XP SP2, VS2005 SP1, and have SQLServerCE3.1 installed. Debugging the application shows that ds.m_spInit->QueryInterface() returns E_NOINTERFACE. I have checked that SSCE runtime library is installed, IDBCreateSession uuid exists in the registry and m_spInit.CoCreateInstance(CLSID_SQLSERVERCE_3_0) return S_OK. Can you suggest me what need adding/installing to get the CSession.Open(datasource) working?