Results 1 to 2 of 2

Thread: Error Code: 80040E14 Minor Error: 25501

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2005
    Posts
    79

    Exclamation Error Code: 80040E14 Minor Error: 25501

    Hi

    I am getting error:
    Error Code: 80040E14
    Message : There was ab errir oarsubg tge qyert, [Token line number, Token line offset,, token in error,,]
    Minor Err.:25501
    Source :Microsoft SQL Server 2000 Windows CE Edition

    It is observed that this error occurs when in the following code txtName.Text value having and ' (Apostrophe) in it.

    VB Code:
    1. Try
    2.             cmd.CommandText = "INSERT INTO  PPCClientDir(ClientID, Name) VALUES(?,?)"
    3.             cmd.Parameters.Add("@p1", intClientID)
    4.             cmd.Parameters.Add("@p2", txtName.Text)
    5.  
    6.             cmd.ExecuteNonQuery()
    7.  
    8.         Catch err As SqlCeException
    9.             ShowErrors(err)
    10.  
    11.         Catch err As Exception
    12.             MsgBox(err.Message, MsgBoxStyle.Critical)
    13.             Me.Close()
    14.         Finally
    15.             If ssceconn.State = ConnectionState.Open Then
    16.                 ssceconn.Close()
    17.             End If
    18.         End Try

    Any idea?

  2. #2
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Error Code: 80040E14 Minor Error: 25501

    try this txtName.text.replace("'","''")
    Barry


    Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
    .NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0

    SQL Server 2005/2000/SQL Server CE 2.0


    If you like, rate this post

    Compact Framework for Beginners

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