|
-
Jan 20th, 2006, 08:46 AM
#1
Thread Starter
Member
sqlce error
hi,
i use sqlce and .net for pocketpc(symbol mc3000)
my code is
SQL_text = "WHERE product_name LIKE ‘%" &
Txtproductname.Text.Trim & "%’ "
and i have this error
[-->product.SQLDS<--]select * from product where product_name
like '%cd%'
system.Data.SqlServerCe.SqlCeException
whats wrong
thanks regards
-
Jan 20th, 2006, 10:49 AM
#2
Fanatic Member
Re: sqlce error
have u tried this in the query analyser in the emulator or device.
The exception you have shown makes no sense. I have never seen anything like it.
Add a try catch around your code so you can see the exact exception.
eg
try
Dim l_sqlstmt As String = "SELECT * FROM Product Where product_name LIKE '%cd%'
......
catch ex as sqlceexception
msgbox ex.message
end try
what exception is thrown.
You are probably better of to post your code for this so we can see where the problem lies. Also note the line the exception is thrown on
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
-
Jan 30th, 2006, 02:44 AM
#3
Thread Starter
Member
Re: sqlce error
hi all,
its done.
its working.
its stupid think maybe but working
SQL = "where product_name like '%%'"
SQL = SQL.Insert(27, Txtproduct_name.Text.ToString)
thanks all.
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
|