Results 1 to 8 of 8

Thread: [RESOLVED] CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2012
    Location
    Toulouse, France
    Posts
    21

    Resolved [RESOLVED] CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

    Hi,

    I notice in my database that specials letters (é,è,à,ç,ê,î,ô,û) are not inserted
    For example if I write "café" : I have "caf㠦". My column datatype is nvarchar, is it normal ?

    I have some other questions :

    [RESOLVED] I want to insert some datas so I use to write something like this example, but how can I insert a ' when delimiters are ' ?
    Code:
    ExecuteSQL("INSERT INTO MyTable VALUES ('MyGameIs', 'Le Jeu de l'Oie')")
    In VB.NET, we just have to insert a second time the letter. How to: Put Quotation Marks in a String (Windows Forms)
    And how to make a multiple insert in 1 SQL ?
    Code:
    VALUES (1, 'Name1'), (2, 'Name2'), (3, 'Name3')
    And my last question, not about SQL, but when I have to do .Dispose() method ?
    Because sometimes when I open a form, or create variables, I do : myVar = New Something

    But I never do .Dispose() at the end, should I ?
    [RESOLVED] I don't know if it's because of that, but I have to wait 10 min to build my project before to simulate it.
    It takes so much long time (I install a patch, but I feel that's change nothing) and it's a bit boring to wait without to do nothing. (Imagine when you forget a little ' or ), and when you have to wait 10 min more! )
    I change one thing to the recommandation (!= true, by == true) and it works now. How to reduce build time in VS 2008
    Thank you!
    Last edited by FrenchFry; Oct 4th, 2012 at 07:52 AM.

  2. #2
    Frenzied Member
    Join Date
    Jul 2006
    Location
    MI
    Posts
    2,012

    Re: CF 3.5 - SQLCe - Impossible to insert éèà...

    Quote Originally Posted by FrenchFry View Post
    I don't know if it's because of that, but I have to wait 10 min to build my project before to simulate it.
    It takes so much long time (I install a patch, but I feel that's change nothing) and it's a bit boring to wait without to do nothing. (Imagine when you forget a little ' or ), and when you have to wait 10 min more! )

    Thank you!

    If it takes 10 minutes to build your project then you have some serious issues with your PC. It should only take a few seconds...

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2012
    Location
    Toulouse, France
    Posts
    21

    Re: CF 3.5 - SQLCe - Impossible to insert éèà...

    Quote Originally Posted by nbrege View Post
    If it takes 10 minutes to build your project then you have some serious issues with your PC. It should only take a few seconds...
    I think so, but do you really think that a very small application for Smart Device (with not a lot of forms, and vars) have to take 10 min to built with a 'good' computer ? I mean 'good' because I never had slow problems, with all my other Uni project on it. Just for Smart Device... I found those subjects on msdn : #subject1, #subject2, #subject3


    I tried to modify the file like MS explains, but it always says that the process is already running...

    Edition:
    I did again those recommandations : #subject, but I change != TRUE, by == TRUE
    And it works now!!! Before : 5/10 mins to build. Now: 1 second !
    It's so much better to work!
    Last edited by FrenchFry; Oct 3rd, 2012 at 03:17 AM.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Sep 2012
    Location
    Toulouse, France
    Posts
    21

    Re: CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

    Does anyone knows how to insert UTF8 chars ? Because I have some é, à, ç chars that make my app crashes... And I really don't know how to solve it.
    Thank you!

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

    you should be using parameters... that might solve the SQL problem.


    As for the build time... is that jsut simply compiling... or is it also deploying to the device as part of the process... that might be where the delay comes in... if you're running an emulator on the local PC, it'll take a little while to start it up... but it shouldn't be taking that long.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Sep 2012
    Location
    Toulouse, France
    Posts
    21

    Re: CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

    I don't know how to use parameters... But I'll check it this week end.
    Thank you

  7. #7
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

    Deploying to the device or emulator for testing does take a little while, especially the first time as it must copy over the cab files before it launches the app.
    For example if I write "café" : I have "caf㠦". My column datatype is nvarchar, is it normal ?
    the square simply means that the selected font does not have the character required and really says nothign about the data.

    I mean 'good' because I never had slow problems
    What do you consider a good computer? There are many factors to consider, OS, Ram, HDD, CPU, other software running on the system at the time. In the case of mobile apps are you using an emulator or the actual device, if the emulator, which one are you using and do you close it after a test? If you close it are you saving the state? If a device then how is it connected? All of these things could be factors that will have an impact on the time it takes from clicking build to the first form appearing for testing.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Sep 2012
    Location
    Toulouse, France
    Posts
    21

    Resolved Re: CF 3.5 - SQLCe - Impossible to insert éèà... (UTF8 chars)

    Thank you for your answer.

    Well I solve my problem with squares.
    I read a file to insert datas in my database. In fact, special chars like é, è, à where changed during the reading ! Not when I was INSERTing.

    So, for people having the same problem to INSERT UTF-8 chars, I changed this :


    Code:
    Dim SR As System.IO.StreamReader = New System.IO.StreamReader(fileName)
    by

    Code:
    Dim SR As System.IO.StreamReader = New System.IO.StreamReader(fileName, System.Text.Encoding.Default)
    And it works, now my datas are good encoded and I can see é, è, à letters instead of squares.

    Thank for the time you've taken to help me, have a good day!

Tags for this Thread

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