Q: What are you trying to achieve here? What's the supposed purpose of
sqlite3_column_type call?

A: What I am trying to do is to display the data in a data table, but the
statement

        std::cout << (char*)sqlite3_column_text(stmt, 0) << std::endl;

produces a segmentation error.

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: Monday, June 25, 2012 12:07 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] C++ programming - creating a table

Arbol One <arbol...@gmail.com> wrote:
>    create_table = "CREATE TABLE friend (name TEXT, address TEXT, age
INT)";
> 
>    std::cout << sqlite3_column_type(stmt,0) << std::endl;

sqlite_column_* functions are only meaningful for queries that produce a
resultset - namely, SELECT and certain PRAGMAs. None of the data definition
statements (of which CREATE TABLE is one), nor INSERT, UPDATE or DELETE
statements, produce a resultset; thus, sqlite3_column_* functions couldn't
be used with them.

What are you trying to achieve here? What's the supposed purpose of
sqlite3_column_type call?
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to