Results 1 to 5 of 5

Thread: checking duplicate

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    checking duplicate

    hi,

    i m developing a mobile application for pda.. with sqlserverce.
    i want to check duplicate thru

    mydataadapter.hasrows

    it's give error that this is not suported with it
    how can i check duplicate

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Re: checking duplicate

    hello...........
    no one knows about it?

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

    Re: checking duplicate

    why are you using .HasRows() to check for a duplicate?

    why not use and executeScalar statement, or catch the duplicate key exception when you try and insert
    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

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: checking duplicate

    I agree with Strider. Perhaps you could post a bit more code around this. Using a data adapter (which I gather from your variable name) would be slow, if possible.
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Re: checking duplicate

    i got a solution...i m using
    if dataadapter.read() then
    ''have some rows
    else
    ''now rows..
    end if

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