|
platform: VC++ 6, Win7 system.
show following:
--------------------Configuration: MyUnicode - Win32 Debug--------------------
Compiling...
MyUnicodeDlg.cpp
g:\myvc\myunicode\sqlite.h(196) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vect
or<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::reverse_iterator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > const *,std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::vector<unsi
gned short,std::allocator<unsigned="" short=""> > const &,std::vector<unsigned short,std::allocator<unsigned="" short=""> > const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,s
td::allocator<unsigned="" short=""> > > >::std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >(const std::allocator<std::vector<unsigned short,std::allocato
r<unsigned="" short=""> > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::reverse_iterator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > *,std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::vector<unsigned s
hort,std::allocator<unsigned="" short=""> > &,std::vector<unsigned short,std::allocator<unsigned="" short=""> > *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,s
td::allocator<unsigned="" short=""> > > >::std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >(const std::allocator<std::vector<unsigned short,std::allocato
r<unsigned="" short=""> > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::reverse_iterator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short="">
> > > const *,std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::alloca
tor<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > const &,std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > const *,int>' : identi
fier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsi
gned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::std::vector<std::vector<std::v
ector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<un
signed short,std::allocator<unsigned="" short=""> > > > > >(const std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::reverse_iterator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short="">
> > > *,std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<st
d::vector<unsigned short,std::allocator<unsigned="" short=""> > > > &,std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > *,int>' : identifier was truncated
to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsi
gned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::std::vector<std::vector<std::v
ector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<un
signed short,std::allocator<unsigned="" short=""> > > > > >(const std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::all
ocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::alloca' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::al
locator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > >,class std::allocator<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,
class="" std::allocator<unsigned="" short=""> > > > > >::std::vector<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > >,cl
ass std::allocator<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > > > >(const class std::allocator<class std::v
ector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: '~vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::al
locator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::alloc' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::al
locator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > >,class std::allocator<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,
class="" std::allocator<unsigned="" short=""> > > > > >::std::vector<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > >,cl
ass std::allocator<class std::vector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > > > >(const class std::allocator<class std::v
ector<class="" std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> >,class std::allocator<class std::vector<unsigned="" short,class="" std::allocator<unsigned="" short=""> > > > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : while compiling class-template member function '__thiscall std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsi
gned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::std::vector<std::vector<std::v
ector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<un
signed short,std::allocator<unsigned="" short=""> > > > > >(const std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > &)'
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >::vector<std::ve
ctor<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >::~vector<std::v
ector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,st
d::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >' :
identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::~vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,s
td::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >'
: identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(80) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::operator=' : identifier was truncated to '255' characters in the debug informatio
n
c:\program files\microsoft visual studio\vc98\include\vector(91) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::capacity' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(95) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::begin' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(99) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,std
::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::end' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(114) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,st
d::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::size' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(231) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,st
d::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::_Destroy' : identifier was truncated to '255' characters in the debug informatio
n
c:\program files\microsoft visual studio\vc98\include\vector(236) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,st
d::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >::_Ucopy' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\vector(52) : warning C4786: 'std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >::vector<std::ve
ctor<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\xmemory(34) : warning C4786: 'std::vector<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > >,st
d::allocator<std::vector<std::vector<unsigned short,std::allocator<unsigned="" short=""> >,std::allocator<std::vector<unsigned short,std::allocator<unsigned="" short=""> > > > > >' : identifier was truncated to '255' characters in the debug information
Linking...
MyUnicode.exe - 0 error(s), 21 warning(s)
I Like VC++!
|
|
|
|
|
|
Are there any plans to add code to support transaction management?
|
|
|
|
|
good and simple to understand
|
|
|
|
|
First of all thanks for this nice wrapper !
But unfortunately it doesn't work with a database path with exotic characters... The conversion is not working correctly.
I've checked the web and others people get issue with WideCharToMultibyte function...
Do you have any idea/workaround ?
Best Regards,
Tof
|
|
|
|
|
Maybe try and give a path example containing chinese characters, and I'll make some tests...
I think that the source of the problem is that chinese has way too many characters (compared to english or Hebrew for example), so it lies in the 4-byte per character zone... And Microsoft's conversion functions may not be able to handle that correctly.
But we'll know more after I run my tests!
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
Thanks for you quick reply.
This is the case for other characters like C:\\èéøÞǽлљΣæča.db
Let me know if you have any idea.
Thanks again !
|
|
|
|
|
Hi again!
I have tested with the filename _T("C:\èéøÞǽлљΣæča.db"), and it has created the file successfully.
Are you compiling in UNICODE mode or in ANSI mode?
Beware that in ANSI mode - the unicode characters could be any other character depending on your local character set... (Win98's codepage, or WinXP's Non-Unicode language set in Control Panel)
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
Hello !
You're right in fact it was linked to the SQLite dll I was using, replacing it solves my issue !
I'm really sorry for the inconvenience.
Thanks for your help !
|
|
|
|
|
I have tested the case with paths containing Chinese (both folder names and file names) with no problem. The program queried out the data successfully.
|
|
|
|
|
Did a test on the program. It is a really easy to use wrapper. Thanks!
|
|
|
|
|
Hello Daniel,
Thanks a lot for your "An easy to use wrapper for SQLite3" on Code Project.
I observed one critical issue with this wrapper. The function QuerySQL or QuerySQL2 returns Table or TablePtr. But if I just delete pTable does not free up complete memory allocated by your "row" s. There is always a big memory leakage after every Query, even after using delete for Table pointer.
Moreover QuerySQL return an object which is locally created in function on Stack memory. When function is out of its scope that memory on stack is no more usable for application.
I just wanted to check, if you have any update concerning above errors. I will be more than happy if you have any
Thanks,
Vijay Chavan
|
|
|
|
|
you use the function strncpy_s which is a Microsoft Visual Studio 2005/.NET Framework 2.0 function.
Regards
Andrew
|
|
|
|
|
why do you use m_pStreamHeader an instance of the parent class? Does the inheritance not the job?
Greetings from Germany
|
|
|
|
|
Man, you must be referring to the Server/Client implementation...
Anyway, if you will look deep into the code (maybe debug it?),
you'll see what it is used for.
In short - it implements another stream management class for handling the header of a packet.
Over the time I will add more detailed comments on the code, right now anything in the code could change, because I have yet to implement encryption and compression.
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
I spent a long time looking for SQLite wrappers over the net and I like yours a lot. But it is difficult for a newcomer to SQLite to step into SQLite and then into wrapper. So basic samples in the article would save a great time.
Just a remark in case your decide to update the article, thanks a lot for your classes.
Yarp
http://www.senosoft.com/
|
|
|
|
|
Hey!
This article is not intended for someone who have just learned that there is something called "c++", first you have to learn some about for,while,if,;,++,--...
Hey! I'm just kidding!
Now seriously:
The classes that I've written here, does not require any samples to be written, and it does not even require great knowledge in c++.
All you have to do, is add the classes to your project, add the SQLite library (found at www.sqlite.org) as source code or as a .lib,
And start using it!
The code is self explanatory! I mean, do you not understand word like "Open Database" or "Execute SQL"?
You simply supply the filename, and it opens the database... You give it an SQL, it executes it...
If SQL examples is what you need - then this is not the right article.
If you need to know how to include the .lib of sqlite in your project, this is also basics and not for this article.
I assume that if a developer is looking for an embedded SQL engine, he is already an experienced programmer, and knows more than he has to know to understand my code.
Cheers!
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
it might help a lot of non experienced people if you could provide some samples of how to use your code.
|
|
|
|
|
Hehe.. I'm no joking! Just got to find the time to write the actual article, the code already exists...
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
Wow, really looking forward to see your implementation. Have been using SQLite for a while but still thinking about the best way to implement client server architecture for it.
|
|
|
|
|
One of the most important thing that I have added is more safe code.
It means that if you have something like this:
SQLite::Database * pDatabase=0;
if (pDatabase->IsOpen())
{
.
.
}
Then IsOpen() will first check if pDatabase is valid, and return false. (Just like CWnd::GetSafeHwnd)
There are some more functions that are "safe" now, like Table::GoFirst...
There's a JoinTable function now to join the rows of two tables,
and there's a () operator for the TablePtr class, so you can use pTablePtr()... instead of pTablePtr->m_pTable...
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
Thank you Daniel,
For what it is worth, I added the following just to make this consistent with some of the other wrappers (e.g. ADO ) that I was using.
bool Database::BeginTransaction() ///< As the name says
{
if (!IsOpen()) {m_iLastError=SQLITE_ERROR; return false;}
return ExecuteSQL(_T("BEGIN TRANSACTION"));
}
bool Database::CommitTransaction() ///< As the name says
{
if (!IsOpen()) {m_iLastError=SQLITE_ERROR; return false;}
return ExecuteSQL(_T("COMMIT TRANSACTION"));
}
bool Database::RollbackTransaction() ///< As the name says
{
if (!IsOpen()) {m_iLastError=SQLITE_ERROR; return false;}
return ExecuteSQL(_T("ROLLBACK TRANSACTION"));
}
|
|
|
|
|
Hi! Thanks!
Personally I'm not using BEGIN/COMIT/ROLLBACK very much, because SQLite has some other advanced methods of controlling those things, and advanced configuration (per SQL statement) what to do in case of failure... you can see sqlite.org for details of their special additions to SQL...
Anyway, I'll add this in my code, and upload it soon. (I'll update the documentation later on, when there's another serious update...
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|
You don't use transactions with SQLite????
You're probably happy with 60 inserts per second performance, do you?
gnk
|
|
|
|
|
Yep! I do not normally have to do more than that! my SELECTs are pretty complicated though...
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
|