Skip to content

Bad characters in example #7

Description

@sachatkm9

Hi !

When running your example, I noticed something wrong with the text. All strings look "corrupted", i.e. "ÌÌÌÌÌÌÌÌÌ". This happens only when inserting text with sqlite->insert().use(), not when using sqlite->simplequery().

I tried to digg down to find the problem, but in vain. Is there something I do wrong, or are there more people having the same issue?

I am running vs2010 on windows7.

Thanks !!

Here's an example:

include "testApp.h"

//--------------------------------------------------------------
testApp::testApp(){

    ofSetLogLevel(OF_LOG_VERBOSE);
    sqlite = new ofxSQLite("analytics.db");

    sqlite->simpleQuery(""\
        "CREATE TABLE IF NOT EXISTS interactions (" \
            "value VARCHAR(255)" \
        ");"
    );
    sqlite->insert("interactions")
        .use("value","Some Text")
        .execute();

    ofxSQLiteSelect sel = sqlite->select("*").from("interactions");
    sel.execute().begin();

    while(sel.hasNext()) {
        std::string name = sel.getString();
        ofLog(OF_LOG_NOTICE,name);
        sel.next();
    }

Result:

sqlite_error

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions