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:
Try
cmd.CommandText = "INSERT INTO PPCClientDir(ClientID, Name) VALUES(?,?)"
cmd.Parameters.Add("@p1", intClientID)
cmd.Parameters.Add("@p2", txtName.Text)
cmd.ExecuteNonQuery()
Catch err As SqlCeException
ShowErrors(err)
Catch err As Exception
MsgBox(err.Message, MsgBoxStyle.Critical)
Me.Close()
Finally
If ssceconn.State = ConnectionState.Open Then
ssceconn.Close()
End If
End Try
Any idea?
Re: Error Code: 80040E14 Minor Error: 25501
try this txtName.text.replace("'","''")