-
Jul 3rd, 2019, 07:51 PM
#1
Thread Starter
Member
[RESOLVED] vb6 Compact & repair sqlite database
hi ..
how can i Compact & repair sqlite database in vb6 ;
another here ?
Last edited by Ami_Tech; Jul 5th, 2019 at 09:30 AM.
-
Jul 4th, 2019, 04:40 AM
#2
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
Hello ..
how can i Optimize Sqlite database By Code in VB6 Plz ...
Last edited by Ami_Tech; Jul 4th, 2019 at 11:40 AM.
-
Jul 4th, 2019, 06:43 AM
#3
Re: vb6 Compact & repair sqlite database
-
Jul 4th, 2019, 06:54 AM
#4
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
Arnoutdv
i have a special driver
ODBC driver for SQLite
Just i want to compact database sqlite by code as access database
-
Jul 4th, 2019, 07:56 AM
#5
Hyperactive Member
Re: vb6 Compact & repair sqlite database
Just google for SQLite vacuum
-
Jul 4th, 2019, 11:35 AM
#6
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
-
Jul 5th, 2019, 01:02 AM
#7
Re: vb6 Compact & repair sqlite database
-
Jul 5th, 2019, 06:22 AM
#8
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
Arnoutdv
i want repair Sqlite DataBase after Delete Record
-
Jul 5th, 2019, 06:51 AM
#9
Re: vb6 Compact & repair sqlite database
I do use SQLite and the vacuum statement, but not using ODBC, so no experience in how to use it.
I use the vbRichClient5 to work with SQLite databases.
Do you really want to compact/vacuum after each delete command?
You are using ODBC for the connection, then are you using ADO for the queries?
If you are using ADO then you could try the Execute method of the connection object.
-
Jul 5th, 2019, 08:54 AM
#10
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
Arnoutdv
Do you really want to compact/vacuum after each delete command?
yes ..
You are using ODBC for the connection, then are you using ADO for the queries?
yes
If you are using ADO then you could try the Execute method of the connection object.
you have sample Code ..
-
Jul 5th, 2019, 08:58 AM
#11
Re: vb6 Compact & repair sqlite database
Originally Posted by Ami_Tech
i want repair Sqlite DataBase after Delete Record
Why is your database getting corrupted after every DELETE?
If you really mean only compact (i.e., VACUUM) that is an expensive operation to be doing frequently. If ODBC doesn't support the VACUUM statement, you should be able to do it via the command line tool (sqlite3.exe) that you can spawn from your program. You may need to close the connection first.
-
Jul 5th, 2019, 09:14 AM
#12
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
topshot
plz if you have sample code about that
-
Jul 5th, 2019, 09:15 AM
#13
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
yes yes i mean compact VACUUM
-
Jul 5th, 2019, 09:25 AM
#14
Thread Starter
Member
Re: vb6 Compact & repair sqlite database
topshot
Arnoutdv
Carlos Rocha
it's work now
i love you
thx
-
Jul 5th, 2019, 12:30 PM
#15
Re: [RESOLVED] vb6 Compact & repair sqlite database
Glad you worked it out. Perhaps you can post your final solution for those with a similar issue in the future.
I hope you are not VACUUMing excessively unless perhaps every delete command is wiping out lots of rows.
-
Jul 5th, 2019, 02:21 PM
#16
Thread Starter
Member
Re: [RESOLVED] vb6 Compact & repair sqlite database
yep ..
Just write this code and it works perfectly
PHP Code:
DB.Close
DB.Execute "VACUUM"
DoEvents
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|