dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

MissingMethodException - ms-sqlserver

This is a discussion on MissingMethodException - ms-sqlserver ; I am getting the following error "MissingMethodException" can't find Pinvoke dll "sqlceme30.dll" On this line of code: Public Function InitDatabase() As Boolean Dim SQL As String If GetSqlCeConnection() Then SQL = "CREATE TABLE sAssets (asset_no integer Primary Key NOT NULL, ...


Home > Database Forum > Microsoft SQL Server > ms-sqlserver > MissingMethodException

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 10-09-2006, 12:19 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default MissingMethodException

I am getting the following error "MissingMethodException"
can't find Pinvoke dll "sqlceme30.dll"

On this line of code:

Public Function InitDatabase() As Boolean

Dim SQL As String

If GetSqlCeConnection() Then

SQL = "CREATE TABLE sAssets (asset_no integer Primary Key NOT NULL, descript
nvarchar(30))"

Dim cmd As New System.Data.SqlServerCe.SqlCeCommand(SQL, CN)

cmd.CommandType = Data.CommandType.Text

cmd.ExecuteNonQuery()

Disconnect()

End If

End Function



Public Function GetSqlCeConnection() As Boolean

Try

CN = New SqlCeConnection(strConn) <=====================ERROR ========

CN.Open()

GetSqlCeConnection = True

Catch err As SqlCeException

GetSqlCeConnection = False

DisplayErrors(err)

End Try

End Function


Reply With Quote
  #2  
Old 09-21-2009, 12:47 AM
Database Newbie
 
Join Date: Sep 2009
Posts: 1
mehdiraouf is on a distinguished road
Default Re: MissingMethodException

Hi,

I got similar problem. When I want to open a sqlceconnection it throws MissingMethodException. Did you fing anything to solve this?


Quote:
Originally Posted by usenet View Post
I am getting the following error "MissingMethodException"
can't find Pinvoke dll "sqlceme30.dll"

On this line of code:

Public Function InitDatabase() As Boolean

Dim SQL As String

If GetSqlCeConnection() Then

SQL = "CREATE TABLE sAssets (asset_no integer Primary Key NOT NULL, descript
nvarchar(30))"

Dim cmd As New System.Data.SqlServerCe.SqlCeCommand(SQL, CN)

cmd.CommandType = Data.CommandType.Text

cmd.ExecuteNonQuery()

Disconnect()

End If

End Function



Public Function GetSqlCeConnection() As Boolean

Try

CN = New SqlCeConnection(strConn) <=====================ERROR ========

CN.Open()

GetSqlCeConnection = True

Catch err As SqlCeException

GetSqlCeConnection = False

DisplayErrors(err)

End Try

End Function
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 08:11 AM.