Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
How can CppSQlite3U be used to execute queries in a similar way to sqlite3_exec(). The purpose of my question is to use CppSQLite3U in one hand but to take advantage of the callback mechanism sqlite3.exec() has 


What I have tried:

sqlite3_exec is a function which is part of sqlite3.
The sqlite3_exec() interface is a convenience wrapper around
[sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
that allows an application to run multiple statements of SQL
without having to use a lot of C code.

CppSQLite3U is a C++ unicode wrapper around the SQLite3 embedded database library and is based on this CodeProject article
[^]
Posted
Updated 21-Feb-16 3:16am

1 solution

You should consider using SQLiteWrappers v1.04[^] by PJ Naughter

As a person who used both ,i would strongly recommend SQLiteWrappers

It supports ANSI and Unicode , STL iterators ,callback etc..

There should be an article about it on CP but i could not find it
 
Share this answer
 
Comments
Michael Haephrati 21-Feb-16 9:54am    
Where does it support Unicode?
Serkan Onat 21-Feb-16 12:42pm    
what do you mean with this question ?
Michael Haephrati 21-Feb-16 12:52pm    
I looked at it but couldn't find an equivalent that accepts UNICODE strings
Serkan Onat 21-Feb-16 13:15pm    
according to your question , you have quoted comment of sqlite3_exec function (in source code)
and assumed that you are familiar with sqlite3 API , but looks like not
of course you can not use wchar_t in sqlite3_exec , but you can convert query string to UTF-8
you can use wchar_t at Statement level , stmt.exec() ,stmt.bind() etc..

for example that wraps

sqlite3_bind_text16 API with wchar_t instead of const void*

pjnaughter 13-Mar-16 8:55am    
All you need to do to see the SQLiteWrappers support for Windows Unicode aka UTF-16 is search for "const wchar_t*" in the SQLiteWrappers.h module.

HTH
PJ Naughter

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900