Results 1 to 6 of 6

Thread: [RESOLVED] missing method exception

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    413

    Resolved [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:
    1. Imports System.Data
    2. Imports System.Data.SqlClient
    3.  
    4. Public Class Form1
    5.     Inherits System.Windows.Forms.Form
    6.     Friend WithEvents Button1 As System.Windows.Forms.Button
    7.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    8.     Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    9.  
    10. #Region " Windows Form Designer generated code "
    11.  
    12.     Public Sub New()
    13.         MyBase.New()
    14.  
    15.         'This call is required by the Windows Form Designer.
    16.         InitializeComponent()
    17.  
    18.         'Add any initialization after the InitializeComponent() call
    19.  
    20.     End Sub
    21.  
    22.     'Form overrides dispose to clean up the component list.
    23.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    24.         MyBase.Dispose(disposing)
    25.     End Sub
    26.  
    27.     'NOTE: The following procedure is required by the Windows Form Designer
    28.     'It can be modified using the Windows Form Designer.  
    29.     'Do not modify it using the code editor.
    30.     Private Sub InitializeComponent()
    31.         Me.MainMenu1 = New System.Windows.Forms.MainMenu
    32.         Me.Button1 = New System.Windows.Forms.Button
    33.         Me.TextBox1 = New System.Windows.Forms.TextBox
    34.         '
    35.         'Button1
    36.         '
    37.         Me.Button1.Location = New System.Drawing.Point(104, 160)
    38.         Me.Button1.Text = "Button1"
    39.         '
    40.         'TextBox1
    41.         '
    42.         Me.TextBox1.Location = New System.Drawing.Point(8, 16)
    43.         Me.TextBox1.Size = New System.Drawing.Size(280, 22)
    44.         Me.TextBox1.Text = "TextBox1"
    45.         '
    46.         'Form1
    47.         '
    48.         Me.ClientSize = New System.Drawing.Size(314, 209)
    49.         Me.Controls.Add(Me.TextBox1)
    50.         Me.Controls.Add(Me.Button1)
    51.         Me.Menu = Me.MainMenu1
    52.         Me.Text = "Form1"
    53.  
    54.     End Sub
    55.  
    56. #End Region
    57.  
    58.  
    59.     Dim myConn As Data.SqlClient.SqlConnection
    60.     Dim myAdapter As SqlClient.SqlDataAdapter
    61.  
    62.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    63.         TextBox1.Text = "Hello World"
    64.         myConn = New SqlClient.SqlConnection
    65.         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"
    66.         Try
    67.             myConn.Open() '<-MissingMethodException
    68.             MsgBox("Open")
    69.             myConn.Close()
    70.         Catch ex As Exception
    71.             MsgBox(ex.Message)
    72.         End Try
    73.     End Sub
    74.  
    75. End Class
    Visual Studio .NET 2005/.NET Framework 2.0

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    413

    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?
    Attached Images Attached Images  
    Visual Studio .NET 2005/.NET Framework 2.0

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    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?
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    413

    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).
    Visual Studio .NET 2005/.NET Framework 2.0

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    413

    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!
    Visual Studio .NET 2005/.NET Framework 2.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width