dhSQLite Error. "Cannot compile SQL-Statement: malformed database schema - near [a" 
Author Message
 dhSQLite Error. "Cannot compile SQL-Statement: malformed database schema - near [a"

Hello...

My name is Jin-woo lived in Korea. Glad to see you.

I found bug in dhSQLite.

I rekeyed "AAA" on my db.
But, I can't open my db with "AAA" key.

Error message is
     "Cannot compile SQL-Statement: malformed database schema - near
[a"

What's the problem with that?



Fri, 01 Jul 2011 17:40:22 GMT  
 dhSQLite Error. "Cannot compile SQL-Statement: malformed database schema - near [a"



Quote:
> I found bug in dhSQLite.

> I rekeyed "AAA" on my db.
> But, I can't open my db with "AAA" key.

> Error message is
>      "Cannot compile SQL-Statement: malformed database schema - near
> [a"

> What's the problem with that?

Are you sure, you are using upper letters "AAA" in the
Open-Call (or the other way round - are you sure you
have *not* rekeyed with lower letters "aaa"?).

Then it is important, that you have created the DB in
question with the wrappers internal Cnn.CreateDB-
command and not over an external SQLite-DBManager.
That has to do with the DB-pagesize my wrapper
sets on a new created DB, which is usually a bit larger
than the SQLite-Default-Pagesize.
So please ensure that - it is most important.

If you have created the DB within an external DB-
Manager, then you should create a new, empty DB with
my wrapper (on e.g. CnnDst) - then open your
"foreign created" SQLite-DB (on e.g. CnnSrc)
and copy over the contents from CnnSrc to CnnDst,
create all the tables, the indexes etc. which are defined
regarding their create-statement in table 'sqlite_master' -
and then simply select each tables content
from CnnSrc into a Recordset, set the
.ActiveConnection of that Recordset to CnnDst
and call UpdateBatch.
This way you can copy over your DB-content to
your new created DB without larger problems.

Another problem could be, that you maybe run a mix
of both versions (dhSQLite.dll and the newer wrapper
dhRichClient.dll).
DBs encrypted with dhSQLite.dll cannot be opened
with the wrapper-classes from dhRichClient.dll and
vice versa, because the internal SQLite-encryption-
support-scheme changed a bit with the newer
sqlite-engine-versions from 3.6 and above.

You can (should) try to use the newer wrapper you
can download here:
www.datenhaus.de/Downloads/dhRichClientDemo.zip
Read the install-instructions for dhRichClient.dll
in the Readme (place a copy of sqlite35_engine.dll
and DirectCOM.dll in your Windows\System32-path),
register dhRichClient.dll on your system,
start a new VB-Project and ensure that you placed
a reference to (only) dhRichClient in your project.

Then make a backup-copy of your existing (unencrypted)
DB (in the same way as described above - which means,
don't make a simple FileCopy - create a new DB with my
Wrapper-Classes and copy the Content over) ... and then
try to enable encryption on this copy over:
Cnn.OpenDB YourDBPathToTheNewCreatedCopy
Cnn.Rekey "AAA"
Set Cnn = Nothing 'close the Connection

'now try to reopen the encrypted DB with:
Set Cnn = New cConnection
Cnn.OpenDB YourDBPathToTheNewCreatedCopy, "AAA"

This should work...
If not, you can send me a copy of your DB (if it
is not too large) or a small Demo-DB which fails
in this regard too.

My Email-Address from this NG-post is capable
to receive replies.

Olaf



Fri, 01 Jul 2011 21:16:04 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB.NET cannot read Access 2000 database's schema

2. "Malformed URL" problem

3. apostrophe in SQL statement causing errors in JET database engine

4. SQL Server Database/Schema Owner.

5. Crystal error: error ocurred reading records: error in compiling sql expression

6. "Cannot open SQL Server"

7. Export Database Schema and content to XML and SQL source

8. OpenRecordset ("Table") or SQL statement

9. SQL-Statement "Like"?

10. SQL: include "'" within the statement

11. SQL "IN" Statement

12. Need help w/ SQL "FROM" statement

 

 
Powered by phpBB® Forum Software