473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

System.Data.SqlServerCe

Hi all,

I'm getting the following error:

The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

and it's the same for

System.Data.Common.DbCommand
System.Data.Common.DbDataAdapter



The code is using

using System.Data.SqlServerCe;

with a reference path to

C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\System.Data.SqlServerCe.dll

The various database commands look like this:

SqlCeConnection conn = new SqlCeConnection(stringConnection);

This program is running on a Windows CE5 handheld and it was all fine before it was decided to upgrade from SQL Server 2005 to SQL Server 2008. I got the same errors when using 2008 so I thought that going back to 2005 would resolve them, but it's still the same. I have removed all .Net Frameworks and even re-installed version 2 but still it's the same.

I have installed:
- SQL Server 2005 with tools (Management Studio)
- SQL Server 2005 Compact 3.1
- .Net Framework 2

Does anyone know what will make this work again?
Jun 11 '09 #1
1 10831
I got this working in the end but just by using an untouched copy of VS 2005 and SQL Server 2005 on another machine. We tried upgrading the program to 2008 but that caused the following error on the handheld (Windows CE):

You are trying to access an older version of SQL Server Mobile database. If this is a SQL Server CE 1.0 or 2.0 database, run upgrade.exe. If this is a SQL Server Mobile 3.0 or later database, run Compact/Repair. [Db version=3505053, Requested version=3004180....

We use a Resco SmartGrid in the handheld app and this was actually what was causing the problem. They have a 2005 series and now a 2009 one. 2005 obviously isn't compatible with 2008 SQL Server and VS 2008 won't recognise the control from the toolbox to add a new one but it will still compile. So because of that fact I didn't think it was an issue. 2009 works fine and it would have probably been easier just to upgrade to 2009 but it costs money and recession times makes that hard to do so we'll just make do for the moment.

I was running:
.Net Framework 3.5
VS 2008
SQL Server 2008
and with the evaluation version of the Resco MobileForms Toolkit 2009 the program was running the exact same on the handheld.

I'm not sure why I couldn't get my machine fully back to 2005 but that doesn't matter now. After spending a full day installing programs and watching progress bars I'm not going through that again ;)
Jun 15 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
0
by: gcrasher | last post by:
I have a business assembly that makes a reference to a CF assembly that uses SqlServerCe. Now I'm trying to write a simple webservice that references this business assembly but I am unable to...
2
by: bokiteam | last post by:
Hi All, I am reading data from database, I can use SQL command set to get data. now I wan to use the same function in WINCE, but I can't find "system.data.oledb" in SmartDevice developing...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
2
by: sabitawoonna | last post by:
I developed 1 new project i.e workstation project.I have one sqlserverce database i.e workstationProject.sdf.In this database i have 2 tables i.e demolist,userinformation. In demolist i have 2...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.