- Previous thread: Re: [sqlite] 2 columns as primary key?
- Next thread: [sqlite] Join performance in SQLite
- Threads sorted by date: sqlite 200905
Hello,
Please let me know if we have an API in SQLite3 which allows me to
retain the database but delete it's content at runtime. The problem I am
facing is that : Every time I restart my system , I need to create the
database. If the database exits already it's contents need to be
deleted. The issue is that the contents of the database varies during
one power ON - Power OFF cycle . As a result , after finding that the
database already exits at the system startup, I cannot just drop the
tables. ( As the table which are present in the existing data base is
not known. )
I am using sqlite3wrapped C++ library APIs.
Thanks and Regards,
Souvik
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Please let me know if we have an API in SQLite3 which allows me to
retain the database but delete it's content at runtime. The problem I am
facing is that : Every time I restart my system , I need to create the
database. If the database exits already it's contents need to be
deleted. The issue is that the contents of the database varies during
one power ON - Power OFF cycle . As a result , after finding that the
database already exits at the system startup, I cannot just drop the
tables. ( As the table which are present in the existing data base is
not known. )
I am using sqlite3wrapped C++ library APIs.
Thanks and Regards,
Souvik
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
An Sqlite database is just a file. Delete the file when you start
your program and when you open the database Sqlite will create a fresh
dne, a very low overhead process..
.
souvik.datta@wipro.com wrote:
> Hello,
>
> Please let me know if we have an API in SQLite3 which allows me to
> retain the database but delete it's content at runtime. The problem I am
> facing is that : Every time I restart my system , I need to create the
> database. If the database exits already it's contents need to be
> deleted. The issue is that the contents of the database varies during
> one power ON - Power OFF cycle . As a result , after finding that the
> database already exits at the system startup, I cannot just drop the
> tables. ( As the table which are present in the existing data base is
> not known. )
>
> I am using sqlite3wrapped C++ library APIs.
>
> Thanks and Regards,
> Souvik
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
> _______________________________________________
> 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
your program and when you open the database Sqlite will create a fresh
dne, a very low overhead process..
.
souvik.datta@wipro.com wrote:
> Hello,
>
> Please let me know if we have an API in SQLite3 which allows me to
> retain the database but delete it's content at runtime. The problem I am
> facing is that : Every time I restart my system , I need to create the
> database. If the database exits already it's contents need to be
> deleted. The issue is that the contents of the database varies during
> one power ON - Power OFF cycle . As a result , after finding that the
> database already exits at the system startup, I cannot just drop the
> tables. ( As the table which are present in the existing data base is
> not known. )
>
> I am using sqlite3wrapped C++ library APIs.
>
> Thanks and Regards,
> Souvik
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
> _______________________________________________
> 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
Yes , I understand that. Infact I was doing that through a script during system startup. I wanted to know whether SQLite provides any API to do the same.
Thanks and Regards,
Souvik
-----Original Message-----
From: sqlite-users-bounces@sqlite.org on behalf of John Stanton
Sent: Sat 5/30/2009 5:30 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Deleting database content : SQLite3 API
An Sqlite database is just a file. Delete the file when you start
your program and when you open the database Sqlite will create a fresh
dne, a very low overhead process..
.
souvik.datta@wipro.com wrote:
> Hello,
>
> Please let me know if we have an API in SQLite3 which allows me to
> retain the database but delete it's content at runtime. The problem I am
> facing is that : Every time I restart my system , I need to create the
> database. If the database exits already it's contents need to be
> deleted. The issue is that the contents of the database varies during
> one power ON - Power OFF cycle . As a result , after finding that the
> database already exits at the system startup, I cannot just drop the
> tables. ( As the table which are present in the existing data base is
> not known. )
>
> I am using sqlite3wrapped C++ library APIs.
>
> Thanks and Regards,
> Souvik
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
> _______________________________________________
> 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
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 30/05/2009 10:20 PM, souvik.datta@wipro.com wrote:
[top-posting unscrambled]
[first message]
>> As a result , after finding that the
>> database already exits at the system startup, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
They are easily knowable. Otherwise how could the database work? Use
"select * from sqlite_master;"
[2nd message, in response to suggestion to delete the file and start
with a new one]
> Yes , I understand that. Infact I was doing that through a script
> during system startup. I wanted to know whether SQLite provides
> any API to do the same.
No, why should it? "Lite" means among other things don't reproduce what
is readily available elsewhere. Consider using the facilities provided
by your C++ runtime libraries.
HTH,
John
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[top-posting unscrambled]
[first message]
>> As a result , after finding that the
>> database already exits at the system startup, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
They are easily knowable. Otherwise how could the database work? Use
"select * from sqlite_master;"
[2nd message, in response to suggestion to delete the file and start
with a new one]
> Yes , I understand that. Infact I was doing that through a script
> during system startup. I wanted to know whether SQLite provides
> any API to do the same.
No, why should it? "Lite" means among other things don't reproduce what
is readily available elsewhere. Consider using the facilities provided
by your C++ runtime libraries.
HTH,
John
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Sat, 30 May 2009 17:50:36 +0530,
wrote:
>
>Yes , I understand that. Infact I was doing that
>through a script during system startup. I wanted
>to know whether SQLite provides any API to do the same.
No, it doesn't. You could write it yourself:
foreach $name in \
sql(SELECT name FROM sqlite_master WHERE type='table';)
do
sql(DELETE FROM $name;)
done
If you use a startup script, there is no need for the C API,
you might as well do something like:
sqlite3 dbfile .schema|sqlite3 dbfile.new
or (if the database is not overly large)
sqlite3 dbfile .dump|grep - v INSERT|sqlite3 dbfile.new
You may want to add a few initialization PRAGMA's to the
pipe.
>Thanks and Regards,
>Souvik
>-----Original Message-----
>From: sqlite-users-bounces@sqlite.org on behalf of John Stanton
>Sent: Sat 5/30/2009 5:30 PM
>To: General Discussion of SQLite Database
>Subject: Re: [sqlite] Deleting database content : SQLite3 API
>
>An Sqlite database is just a file. Delete the file when you start
>your program and when you open the database Sqlite will create a fresh
>dne, a very low overhead process..
>.
>souvik.datta@wipro.com wrote:
>> Hello,
>>
>> Please let me know if we have an API in SQLite3 which allows me to
>> retain the database but delete it's content at runtime. The problem I am
>> facing is that : Every time I restart my system , I need to create the
>> database. If the database exits already it's contents need to be
>> deleted. The issue is that the contents of the database varies during
>> one power ON - Power OFF cycle . As a result , after finding that the
>> database already exits at the system startup, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
>>
>> I am using sqlite3wrapped C++ library APIs.
>>
>> Thanks and Regards,
>> Souvik
--
( Kees Nuyt
)
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
wrote:
>
>Yes , I understand that. Infact I was doing that
>through a script during system startup. I wanted
>to know whether SQLite provides any API to do the same.
No, it doesn't. You could write it yourself:
foreach $name in \
sql(SELECT name FROM sqlite_master WHERE type='table';)
do
sql(DELETE FROM $name;)
done
If you use a startup script, there is no need for the C API,
you might as well do something like:
sqlite3 dbfile .schema|sqlite3 dbfile.new
or (if the database is not overly large)
sqlite3 dbfile .dump|grep - v INSERT|sqlite3 dbfile.new
You may want to add a few initialization PRAGMA's to the
pipe.
>Thanks and Regards,
>Souvik
>-----Original Message-----
>From: sqlite-users-bounces@sqlite.org on behalf of John Stanton
>Sent: Sat 5/30/2009 5:30 PM
>To: General Discussion of SQLite Database
>Subject: Re: [sqlite] Deleting database content : SQLite3 API
>
>An Sqlite database is just a file. Delete the file when you start
>your program and when you open the database Sqlite will create a fresh
>dne, a very low overhead process..
>.
>souvik.datta@wipro.com wrote:
>> Hello,
>>
>> Please let me know if we have an API in SQLite3 which allows me to
>> retain the database but delete it's content at runtime. The problem I am
>> facing is that : Every time I restart my system , I need to create the
>> database. If the database exits already it's contents need to be
>> deleted. The issue is that the contents of the database varies during
>> one power ON - Power OFF cycle . As a result , after finding that the
>> database already exits at the system startup, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
>>
>> I am using sqlite3wrapped C++ library APIs.
>>
>> Thanks and Regards,
>> Souvik
--
( Kees Nuyt
)
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
What would be the point of a function which just performs a syste call
like unlink? Bloat?
souvik.datta@wipro.com wrote:
> Yes , I understand that. Infact I was doing that through a script during system startup. I wanted to know whether SQLite provides any API to do the same.
>
> Thanks and Regards,
> Souvik
> -----Original Message-----
> From: sqlite-users-bounces@sqlite.org on behalf of John Stanton
> Sent: Sat 5/30/2009 5:30 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Deleting database content : SQLite3 API
>
> An Sqlite database is just a file. Delete the file when you start
> your program and when you open the database Sqlite will create a fresh
> dne, a very low overhead process..
> .
> souvik.datta@wipro.com wrote:
>
>> Hello,
>>
>> Please let me know if we have an API in SQLite3 which allows me to
>> retain the database but delete it's content at runtime. The problem I am
>> facing is that : Every time I restart my system , I need to create the
>> database. If the database exits already it's contents need to be
>> deleted. The issue is that the contents of the database varies during
>> one power ON - Power OFF cycle . As a result , after finding that the
>> database already exits at the system startup, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
>>
>> I am using sqlite3wrapped C++ library APIs.
>>
>> Thanks and Regards,
>> Souvik
>>
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>>
>> www.wipro.com
>> _______________________________________________
>> 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
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
> _______________________________________________
> 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
like unlink? Bloat?
souvik.datta@wipro.com wrote:
> Yes , I understand that. Infact I was doing that through a script during system startup. I wanted to know whether SQLite provides any API to do the same.
>
> Thanks and Regards,
> Souvik
> -----Original Message-----
> From: sqlite-users-bounces@sqlite.org on behalf of John Stanton
> Sent: Sat 5/30/2009 5:30 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Deleting database content : SQLite3 API
>
> An Sqlite database is just a file. Delete the file when you start
> your program and when you open the database Sqlite will create a fresh
> dne, a very low overhead process..
> .
> souvik.datta@wipro.com wrote:
>
>> Hello,
>>
>> Please let me know if we have an API in SQLite3 which allows me to
>> retain the database but delete it's content at runtime. The problem I am
>> facing is that : Every time I restart my system , I need to create the
>> database. If the database exits already it's contents need to be
>> deleted. The issue is that the contents of the database varies during
>> one power ON - Power OFF cycle . As a result , after finding that the
>> database already exits at the system startup, I cannot just drop the
>> tables. ( As the table which are present in the existing data base is
>> not known. )
>>
>> I am using sqlite3wrapped C++ library APIs.
>>
>> Thanks and Regards,
>> Souvik
>>
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>>
>> www.wipro.com
>> _______________________________________________
>> 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
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
> _______________________________________________
> 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
On Sat, May 30, 2009 at 1:20 PM, wrote:
> Yes , I understand that. Infact I was doing that through a script during system startup. I wanted to know whether SQLite provides any API to do the same.
No, and it doesn't provide any API for changing access permissions on
the database file, or moving or copying it from one part of the
filesystem to another, or adding extended attributes to it, or sending
kernel notifications when it is modified, either. Nor does it provide
any API for on-the-fly JPEG decompression, sending tweets, processing
LaTeX documents, or taking cosines. Why would it?
Hamish
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> Yes , I understand that. Infact I was doing that through a script during system startup. I wanted to know whether SQLite provides any API to do the same.
No, and it doesn't provide any API for changing access permissions on
the database file, or moving or copying it from one part of the
filesystem to another, or adding extended attributes to it, or sending
kernel notifications when it is modified, either. Nor does it provide
any API for on-the-fly JPEG decompression, sending tweets, processing
LaTeX documents, or taking cosines. Why would it?
Hamish
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Related Threads
- fedora-related pdftohtml utility? - fedora
- [Hendrix] You destroyed my computer - firefox
- [Hendrix] Firefox cannot download updates - firefox
- DO NOT REPLY [Bug 48345] New: Session does time-out shorter than setting in web.xml when PersistentManager is used. - tomcat
- [Hendrix] yy - firefox
- Re: Re: defaulting to net.ipv6.bindv6only=1 for squeeze - debian
- Accumulation of Request Processors objects causes tomcat stuck? - tomcat
- /opt/local/lib/libgcc_s.1.dylib, binutils, llvm-gcc42 - macports
- [Wine] Kings Bounty- Armoured Princess - wine
- Smart inbox properties - thunderbird
- [Wine] Convert Video on iPod /iPhone at Will - wine
- [Hendrix] Problem opening html files - firefox