[RESOLVED] missing method exception
Ok, I've been searching and searching and have found no answers.
All I am tring to do is open a connection to my database and keep getting a "missing method exception" error on the .open command.
The connection strings works perfect on a VB windows App.
Any Idieas. WM 5.0 / iPaq rx5915 (tried both 1.0 and 2.0 CF)
program VB .net 2003 and 2005
vb 2003 code:
VB Code:
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Inherits System.Windows.Forms.Form
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
MyBase.Dispose(disposing)
End Sub
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(104, 160)
Me.Button1.Text = "Button1"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(8, 16)
Me.TextBox1.Size = New System.Drawing.Size(280, 22)
Me.TextBox1.Text = "TextBox1"
'
'Form1
'
Me.ClientSize = New System.Drawing.Size(314, 209)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Button1)
Me.Menu = Me.MainMenu1
Me.Text = "Form1"
End Sub
#End Region
Dim myConn As Data.SqlClient.SqlConnection
Dim myAdapter As SqlClient.SqlDataAdapter
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "Hello World"
myConn = New SqlClient.SqlConnection
myConn.ConnectionString = "data source=192.168.0.252;initial catalog=MohawkSpr;persist security info=False;user id=mohawkspr;password=1;workstation id=ica5;packet size=4096"
Try
myConn.Open() '<-MissingMethodException
MsgBox("Open")
myConn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class
Re: missing method exception
Hi,
try
Persist Security Info=False;Integrated Security=False;Server=192.168.0.252;initial catalog=MohawkSpr;user id=mohawkspr;password=1;
Pete
1 Attachment(s)
Re: missing method exception
I'm not 100% sure, but I think when I load the compact framework, I'm not getting everything. I have attached below of the file listing of the framework dll's. It seams to be missing the system.data.sqlclient dll?
Am I installing the wrong framework?
Re: missing method exception
If you are debugging this on the hardware device, the System.Data.SQLClient should be installed automatically when you start debugging.
If you aren't debugging on the hardware device, are you loading the cabs? If so, could you have missed one?
Re: missing method exception
I've been debugging it on my iPaq rx5915. I installed the .net framework compact edition. I thought this was supposed to install all the .net components. As you can see from the above picture, it installs most of them but not the one I need. (system.data.sqlclient).
Re: [RESOLVED] missing method exception
I found a cab in the "Windows Mobile 5.0 Developer Resource Kit" that contained a cab that had the sqlclient in it (sql.ppc.wce5.armv4i.CAB)
This added the system.data.sqlclient that I needed. yah!