MissingMethodException

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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


.



Relevant Pages

  • Re: Incorporating optional function argument
    ... If, for instance, you had MsgBox =Test or Debug.Print Test there would be something for the user to observe. ... Public Function test(strMsg As String, Optional blnVal As Boolean = False) ... A break point at the Public Function line does not result in the code breaking. ...
    (microsoft.public.access.formscoding)
  • Re: Listview resize
    ... Below is a module for many of the macro calls to the listview. ... Public Enum LVMessages ... Public Function ListView_SetBkColorAs Boolean ...
    (microsoft.public.vb.general.discussion)
  • Re: Use Try-Catch or If Statement?
    ... they are both having the same logic, but one is using a try-catch ... Public Function ExistsAs Boolean ... Dim bReturn as Boolean = False ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Tracking Lots Different Constant (Switch) Groupings
    ... Public Function AccountByName() As Boolean ... For situations where you need a slightly quicker test - then using a bit ...
    (microsoft.public.vb.general.discussion)
  • Re: Why capGetStatus & capDriverGetCaps doesnt work?
    ... Henry Wu wrote: ... ByRef lParam As CAPDRIVERCAPS) As Boolean ... > Public Function capDriverGetCapsAs Boolean ...
    (microsoft.public.dotnet.languages.vb)