|
-
Oct 29th, 2005, 07:15 AM
#1
Thread Starter
Lively Member
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?
-
Oct 31st, 2005, 09:26 AM
#2
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|