PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Could not load type 'System.Data.SqlServerCe.SqlCeConnection' from assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91'.

Reply

Could not load type 'System.Data.SqlServerCe.SqlCeConnection' from assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91'.

 
Thread Tools Rate Thread
Old 11-09-2006, 05:36 PM   #1
yogeshvc@gmail.com
Guest
 
Posts: n/a
Default Could not load type 'System.Data.SqlServerCe.SqlCeConnection' from assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91'.


Hi,

I m new bie to VS 2005 pocket pc development. I m trying to connect to
SQL CE database which will be created locally and used locally by
pocket pc application and nothing to do with sql server 2005 database.

Added Reference - System.Data.SqlServerCe

Dim engine As New SqlCeEngine("Data Source = \My Documents\test.sdf")
engine.CreateDatabase()

Dim ssceconn As New SqlCeConnection("Data Source = \My
Documents\test.sdf")
ssceconn.Open()

Dim sqlCreateTable As SqlCeCommand = ssceconn.CreateCommand()
sqlCreateTable.CommandText = "CREATE TABLE People(people_id int
IDENTITY(0,1) PRIMARY KEY, f_name ntext, l_name ntext)"
sqlCreateTable.ExecuteNonQuery()

Dim sqlInsertRow As SqlCeCommand = ssceconn.CreateCommand()
sqlInsertRow.CommandText = "INSERT INTO People(f_name, l_name)
VALUES('John', 'Doe')"
sqlInsertRow.ExecuteNonQuery()
ssceconn.Close()

And along with this, I cannt see Microsoft SQL Server Mobile Edition
while adding datasource in my project.
Data | Add New Data Source.

Guys please guide me thr' this.

Yogesh

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off