VBNET2008 -runtime Error message


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: VBNET2008 -runtime Error message

  1. #1
    Join Date
    Jan 2005
    Location
    New Zealand
    Posts
    319

    Smile (RESOLVED) VBNET2008 -runtime Error message

    Hi Good Guys and Helpers

    I have received an error message which I could not figure it out.

    Error message
    No mapping exists from object type System.Windows.Forms.TextBox to a known Manage provider native type
    -------------------------------------------------------------------
    The code below generates this error message at runtime.

    Code:
     Private Sub FUpdateExistingRecord()
       
             
     try
            Dim strSql As String = Nothing
            strSql = "Update TestCustomers"
            strSql &= " Set CompanyName = @custName "  
            strSql &= " Where CustomerId = @CustID"
    
            sqlconn = New SqlConnection(connstr)
            sqlconn.Open()
            sqlCmd = New SqlCommand(strSql, sqlconn)
    
            With sqlCmd.Parameters
                .AddWithValue("@CustId", Me.txtCustID.Text)
                .AddWithValue("@CustName", Me.txtCompanyName.Text)
           End With
    
           sqlCmd.ExecuteNonQuery
          sqlconn.close
    
    Catch Ex as Exception
    	messagebox.show(ex.message)
    End Try
    Last edited by Lennie; 03-21-2010 at 10:58 PM. Reason: Resolved
    Cheers,
    Lennie

Similar Threads

  1. Replies: 0
    Last Post: 05-15-2008, 05:24 PM
  2. Replies: 1
    Last Post: 06-06-2007, 01:57 PM
  3. Replies: 1
    Last Post: 11-19-2005, 02:13 AM
  4. Runtime libraries installation
    By Rahul Dixit in forum C++
    Replies: 5
    Last Post: 07-18-2005, 08:21 PM
  5. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 07:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center