Results 1 to 3 of 3

Thread: sqlce error

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2002
    Location
    Istanbul
    Posts
    49

    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
    Calf

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

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2002
    Location
    Istanbul
    Posts
    49

    Resolved 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.
    Calf

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