Re: Vs2003 with SQL Server CE - RDA assembly error
- From: "Laxmi Narsimha Rao Oruganti [MSFT]" <laxmi.online@xxxxxxxxxx>
- Date: Mon, 5 Jan 2009 22:38:12 +0530
1) Can you check if you System.Data.SqlServerCe.dll available?
2) Can you check if you can connect to the database using ISQLW20 or
SqlCeConnection.Open?
Thanks,
Laxmi
"JaffaB" <jaffa_brown@xxxxxxxxxxx> wrote in message
news:24a343c0-7772-4527-a6bc-b9999cf7791c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello All,
I am busy trying to fit an RDA data exchange into a legacy VS2003
application. However, when it gets to the part to start the RDA, I am
getting the following error:
System.TypeLoadException:Could not load type
System.Data.SqlServerCe.SqlCeRemoteDataAccess
from assembly System.Data.SqlServerCe,
Version=1.0.5000.0,
Culture=neutral,
PublicKeyToken=969DB8053D3322AC.
Looking at some various (unhelpful) Microsoft web sites, it says that
the SqlCeRemoteDataAccess function is only available in Framework 1.1,
but does not mention which CF version. According to my device, it is
running .NET compact Framework 1.0.4292.00
Do I need to upgrade this version? In which case, the only upgrade
path is to 2.0, which is a VS 2005 version.
anybody have any ideas?
Thought it might also be worth actually posting some of my code..
so at the top, we have....
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlServerCe;
using System.Text;
And then in the RDA section......
public static String PushDatabase()
{
if (!File.Exists("\\My Documents\
\MyDatabase.sdf"))
{
// file does not exist, so return
return "N";
}
//
// Routine to push data back to the
connected SQL database
//
string sConnectionString =
MBTApp.GetConnectionString();
string url = string.Format("http://myserver/
RDA/sscesa20.dll");
using (SqlCeRemoteDataAccess rda = new
SqlCeRemoteDataAccess
(url,"", "", sConnectionString))
{
try
{
rda.LocalConnectionString =
"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\\My Documents\
\MyDatabase.sdf";
rda.Push ("BT_AUDIT",
sConnectionString,
RdaBatchOption.BatchingOn);
donecount = donecount + 1;
..
..
etc
.
- References:
- Vs2003 with SQL Server CE - RDA assembly error
- From: JaffaB
- Vs2003 with SQL Server CE - RDA assembly error
- Prev by Date: Re: SQLCE 2.0 support under IIS7 (Vista)
- Next by Date: Strange SqlCE error
- Previous by thread: Vs2003 with SQL Server CE - RDA assembly error
- Next by thread: SQLCE 2.0 support under IIS7 (Vista)
- Index(es):
Relevant Pages
|