Storing Bulk Data From Dataset To Sql Mobile 2005 Using C#

Apr 3, 2006

hi,

I have developed an application in c#.net 2.0 for Pocket PC. And even i developed a webservice to communicate between sql server 2005 and sql mobile 2005. Webservice returns the data in a dataset format from sql server 2005, but while inserting the data row by row from dataset, it is taking a huge amount of time. I would like to know, is there any way where i can copy the bulk data from dataset into the sql mobile 2005 using c#.And how this can be achieved.

Thank you

View 5 Replies


ADVERTISEMENT

Bulk Import Data To SQL Mobile

Jul 26, 2006

Hi!.

Is there something like BCP utility in SQL CE?

I need to import (pereodicaly) large ammount of data to my CE database. When tested import on network this take a lot of time. That's why decided to send raw data in ASCII files (because of small size) and to import files to CE database.

Certainly, it's not a problem to write those cli by myself, but it's interesting if someone already did this...

Thanks, Sandr

View 3 Replies View Related

Adding Table To Dataset For SQL Server Mobile Causes VS 2005 To Lock Up.

Apr 20, 2006

I am running VS 2005 Professional Edition

Windows XP profession with Service Pack 2

SQL Server 2005 Developer Edition.

WHAT I HAVE DONE:

I have a database running in an instance of SQL Server.

I set this up for merge publication and then set up a SQL Server Mobile Edition Subscription to that publication.  After a few oversights I got everything working.  The Mobile database replicated just fine.  I went back verified all data was there.  Can make queries to it.

 

PROBLEM: 

I set up a new dataset to use tables from the SQL Server Mobile database.  If I drag one of the tables to the dataset, VS 2005 simply stops responding.  It is not using any processor. I click any place on the application and I get the Microsoft Visual Studio Delay Notification saying:

Microsoft Visual Studio is Busy.

Microsoft Visual Studio is waiting for an internal operation to complete.  If you regularly encounter this delay during normal usage, please report this problem to Microsoft.

Well...  It is more than just a delay.  The environment is not using any processor its just sitting here.  And I left it running for 2.5 hours...  so now this is becoming a big source of pain for me because I need to get that dataset working to finish my business logic.  The only option I have is to Kill the process.

Hopefully someone out there can help.

Additional Services running:

IIS (Whatever version comes with Windows XP Pro.  I think 5.1)

SQL Server Agent, SQL Server Integration Services, SQL Server Broswer and SQL Server FullTextSearch

UPDATE:  I am editing this post with an update.

I noticed that my other tables get added to the dataset just fine.  It is when I add one particular table that the entire visual studio simply stops and starts giving the delay notification.  I have no idea why this happens... nor do I see any noticeable difference between this table and the rest of them.  I went back and made sure that all columns types where directly supported by SQL Mobile Edition and they are.

 

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

Storing Arabic Data In Db(sql Server 2005)

Oct 1, 2007

Hi,
How to insert or store arabic data into a table in sql server 2005, also i want to retrieve it as arabic format.But now it insert  (?????) like this.Please help me to find a solution. 
Regards
Sabna S

View 3 Replies View Related

Inserting Dataset Values Into SQL Mobile Using C#

Apr 14, 2006

Hi,

I have developed an application where i am inserting all the records from the dataset into sql mobile 2005. Dataset contains a primary key which is an uniqueidentifier datatype. While inserting the data it is inserting properly into the database but it is changing the value of primary key which is in the dataset.

I am using the below syntax, please suggest me so that to avoid creating a different uniqueidentier key into the database.

conAdap = new SqlCeDataAdapter(strQuery, conSqlceConnection);

SqlCeCommandBuilder cmdBuilder = new SqlCeCommandBuilder(conAdap);

conAdap.AcceptChangesDuringFill = false;

conAdap.Fill(dsData);



conAdap.MissingMappingAction = MissingMappingAction.Passthrough;

conAdap.InsertCommand = cmdBuilder.GetInsertCommand();

conAdap.InsertCommand.Connection = conSqlceConnection;

int r =conAdap.Update(dsData.Tables[0]);

Thank you,

Prashant Mulay

View 1 Replies View Related

Load A Dataset To SQL Mobile (Quickly)

Jul 10, 2007

I have five small tables that I need to insert to a SQL CE database.

I am using the 2.0 Compact Framework with the 2.0 System.Data.SqlServerCe.



My table definition is dynamic so I never know it's design.



1- If I go Row by Row using an this.ExecuteNonQuery(_global, par); it takes about 26 seconds to insert 5 tables of 330 rows.



2- If a use

StringBuilder sbColumns = new StringBuilder();

foreach (DataColumn dc in table.Columns)

{

if (sbColumns.ToString() != "")

sbColumns.Append(",");

sbColumns.Append(dc.ColumnName);

}

SqlCeDataAdapter da = new SqlCeDataAdapter("SELECT " + sbColumns.ToString() + " FROM " + _tablename, m_con);

SqlCeCommandBuilder cb = new SqlCeCommandBuilder(da);

da.MissingMappingAction = MissingMappingAction.Passthrough;

da.InsertCommand = cb.GetInsertCommand();

da.Update(table);

da.Dispose();



it takes about 46 seconds.



How Can write it faster or is this fastest it can go?



Thanks

View 1 Replies View Related

Storing Time-series Data In SQL Server 2005

May 1, 2007

Hi all,

I'm wondering what is the best way to store time-series data in an SQL database?? I've done a bit of investigating on the rrdtool (round robin database tool) that is used in a lot of nix based solutions for monitoring network equipment. I have a need to collect performance data from servers and routers and then produces some nice graphs from that data. I'm just not sure who i should store that data without the database growing to some huge size.



Any suggestions?

View 1 Replies View Related

Which Is Better? Storing Data In The Database OR Storing It In The File System

Dec 29, 2006

Hello there,I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local hostAlso i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net? Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server Is it ok to just use a web server for storing files than a database?    

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

Need Help With Taking Data From A Card Reader And Storing It Into SQL Server 2005

Feb 7, 2007

I'm using a Hemisphere West MSR-152 card reader. I need to take data from the reader and store it into SQL Server 2005 Express. Can anyone give ideas on how to do this (sample code recommendations). I'm using visual studio 2005 express and I code with VB.NET.

View 3 Replies View Related

Using Push In RDA For Sync The Data From Sql Mobile To Sql Server 2005

Oct 6, 2006

Hi Everyone,

I have tried the Sync the data from sql server mobile (.SDF) to Sql server 2005 (.mdf).In push command, i am getting the error "Sql Server Everywhere encountered problems when opening the database".
string rdaOleDbConnectString = @"Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=master;Data Source=PRASSANAPRASANNA;Password=master";
qlCeRemoteDataAccess rda = null;
try
{
rda = new SqlCeRemoteDataAccess();
rda.LocalConnectionString = "Data Source=D:/DATABASE/test.sdf";
rda.InternetUrl = http://localhost/Dataset/sqlcesa30.dll;
rda.Push("company", rdaOleDbConnectString, RdaBatchOption.BatchingOn);
MessageBox.Show("Completed");

}

catch (SqlCeException)

{



}



finally

{



rda.Dispose();



}

please guide me any one ours guys to solve this problem .

Thanks

Prasanna.





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

How To Add Data In Sql Mobile Database From Sql Server 2005 Management Studio

Feb 17, 2006



Hi,

After creating mobile database into sql server 2005 management studio, how to insert the records from sql server 2005 management studio into and mobile database from excel file?

Thank you

Prashant

View 1 Replies View Related

Loading Data In SQL Mobile 2005 From The Server Side And Not On The Handheld

Mar 31, 2006

Hello,

We are in need of some help around the use of SQL Server 2005 Mobile Edition.

The problem comes in when we have to import a large list of equipment ID€™s into the database.

The way that things work today is that the database only runs on the handheld computer, so we are having to process a large amount of data on the handheld therefore taking a lot of time.

If there were a way to have a €œseed€? database on the server side (running on Windows Server 2003 or similar) and import all of this data on the server side it would be more efficient and require less time.

Once the data was imported on the server side we can simply transfer this seed database down to the handheld

Could you please throw some light on the above queries.

Thanks in advance.

Jeeves



View 1 Replies View Related

How To Encrypt My Password Or Sensitive Data Before Storing Them In A Database , Using SQL Server 2005?[urgent Plz Help]

Jan 7, 2007

Hi there ,1. i have a database and i want to encrypt my passwords before storing my records in a database plus i will later on would require to  authenticate my user so again i have to encrypt the string provided by him to compare it with my encrypted password in database below is my code , i dont know how to do it , plz help 2. one thing more i am storing IP addresses of my users as a "varchar" is there a better method to do it , if yes plz help me    try        {            SqlConnection myConnection = new SqlConnection();            myConnection.ConnectionString = ConfigurationManager.ConnectionStrings["projectConnectionString"].ConnectionString;            SqlDataAdapter myAdapter = new SqlDataAdapter("SELECT *From User_Info", myConnection);            SqlCommandBuilder builder = new SqlCommandBuilder(myAdapter);            DataSet myDataset = new DataSet();            myAdapter.Fill(myDataset, "User_Info");            //Adding New Row in User_Info Table               DataRow myRow = myDataset.Tables["User_Info"].NewRow();            myRow["user_name"] = this.user_name.Text;            myRow["password"] = this.password.Text; // shoule be encrypted             //not known till now how to do it                       myRow["name"] = this.name.Text;            myRow["ip_address"] = this.ip_address.Text;                        myDataset.Tables["User_Info"].Rows.Add(myRow);            myAdapter.Update(myDataset, "User_Info");            myConnection.Close();            myConnection.Dispose();        }        catch (Exception ex)        {            this.error.Text = "Error ocurred in Creating User : " + ex.Message;        }  

View 3 Replies View Related

Bulk Update Of All Changes From DataView To DataSet (only Opening Connection Once)?

Feb 15, 2008

(Hope this isn't a "stupid" question, but I haven't been able to find a straight-forward answer anywhere)"
I currently have code that iterates through a dataview's records, making a change to a field in some of the records. The way I have this coded, a conection has to opened & closed for each individual record that's updated:
    dsrcUserIae.UpdateCommand = "UPDATE UserIAE SET blnCorrect = @blnCorrect WHERE (ID = @ID)"    dsrcUserIae.UpdateParameters.Add("blnCorrect", SqlDbType.Bit)    dsrcUserIae.UpdateParameters.Add("ID", SqlDbType.Int)
    Dim myDataView As DataView = CType(dsrcUserIae.Select(DataSourceSelectArguments.Empty), DataView)         For Each myRow As DataRowView In myDataView       If myRow("FkUsersAnswerID") = myRow("AnswerID") Then         intCorrect = 1       Else         intCorrect = 0       End If       dsrcUserIae.UpdateParameters.Item("blnCorrect").DefaultValue = intCorrect       dsrcUserIae.UpdateParameters.Item("ID").DefaultValue = myRow("ID")       intUpdateResult = dsrcUserIae.Update()    Next
It seems like I should be able to do something like this (call update once), but I'm not sure how... 
    dsrcUserIae.UpdateCommand = "UPDATE UserIAE SET blnCorrect = @blnCorrect WHERE (ID = @ID)"    dsrcUserIae.UpdateParameters.Add("blnCorrect", SqlDbType.Bit)    dsrcUserIae.UpdateParameters.Add("ID", SqlDbType.Int)
    Dim myDataView As DataView = CType(dsrcUserIae.Select(DataSourceSelectArguments.Empty), DataView)            For Each myRow As DataRowView In myDataView      If myRow("FkUsersAnswerID") = myRow("AnswerID") Then        myRow("blnCorrect") = 1      Else        myRow("blnCorrect") = False      End If    Next
      intUpdateResult = dsrcUserIae.Update() 'Want all changed myRow("blnCorrect") to be updated to datasource
Can anybody explain how to do the bulk update? I've seen some info about AcceptChanges and Merge, but I'm not sure if they apply here, or if they more for Transactions.

View 1 Replies View Related

Bulk Insert - Bulk Load Data Conversion Error

Jan 17, 2008

Im having some issues with bulk insert.

This is the table:

CREATE TABLE [dbo].[tmp_GA_status](

[GA_recno] [int] NOT NULL,

[GA_desc] [varchar](40) NULL

)


This is the file (unicode):
1|"test1"
2|"test2"
3|"test3"
4|"test4"
5|"test5"
6|"test6"
7|"test7"
8|"test8"


and this is the sql:

bulk insert tmp_GA_status from 'C: empTextDumpGA_status.dta'

with (CODEPAGE='RAW', FIELDTERMINATOR='|', ROWTERMINATOR='
', DATAFILETYPE='widechar')



so yeah, pretty simple. But whatever I do I get this;

Msg 4864, Level 16, State 1, Line 1

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 2 (GA_desc).



So what am I doing wrong ?

View 13 Replies View Related

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

Sending Uploaded Image To Data Access Class When Storing Image In SQL Server 2005

Apr 20, 2007

I am using the 3-tiered architecture design (presentation, business laws, and data acess layers). I am stuck on how to send the image the user selects in the upload file control to the BLL and then to the DAL because the DAL does all the inserts into the database. I would like to be able to check the file type in the BLL to make sure the file being uploaded is indeed a picture. Is there a way I can send the location of the file to the BLL, check the filetype, then upload the file and have the DAL insert the image into the database? I have seen examples where people use streams to upload the file directly from their presentation layer, but I would like to keep everything seperated in the three classes if possible. I also wasn't sure what variable type the image would be in the function in the BLL that receive the image from the PL. If there are any examples or tips anyone can give me that would be appreciated.

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

How To Transfer Data From One Dataset To Other Dataset

Apr 11, 2008

i have two datasets.one dataset have old data from some other database.second dataset have original data from sql server 2005 database.both database have same field having id as a primary key.i want to transfer all the data from first dataset to new dataset retaining the previous data but if old dataset have the same id(primary key) as in the new one then that row will not transfer.
but if the id(primary key) have changed values then the fields updated with that data.how can i do that.
 

View 4 Replies View Related

BULK INSERT ERROR Using Format File - Bulk Load Data Conversion Error

Jun 29, 2015

I'm trying to use Bulk insert for the first time and getting the following error. I think it might have something to do with my Format File and from the error msg there's a conversion error for the first column. In my database the Field is nvarchar(6) so my best guess is to use SQLNChar for the first column. I've checked the end of each line is CR LF therefore the is correct for line 7 right?

Msg 4863, Level 16, State 1, Line 1
Bulk load data conversion error (truncation) for row 1, column 1 (ASXCode).
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".

BULK
INSERTtbl_ASX_Data_temp
FROM
'M:DataASXImportTest.txt'
WITH
(FORMATFILE='M:DataASXSQLFormatImport.Fmt')

[code]...

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

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

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







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