Re: [sqlite] Reset value of sqlite_sequence

2018-02-11 Thread R Smith
On 2018/02/11 3:12 AM, Stephen Chrzanowski wrote: How does one reset the sqlite_sequence values? How about: UPDATE sqlite_sequence SET seq = 1 WHERE name = 'myTable'; ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Reset value of sqlite_sequence

2018-02-11 Thread Stephen Chrzanowski
Thanks Ryan. The problem I had was with the string "myTable" when I was doing a Delete. My wrapper isn't 100% Unicode friendly apparently, and I had to do a minor and easy work around. Even SQLite Expert wasn't returning what I wanted from a select, so I eventually determined my insert

Re: [sqlite] Reset value of sqlite_sequence

2018-02-11 Thread R Smith
(Apologies if this is duplicate) On 2018/02/11 3:12 AM, Stephen Chrzanowski wrote: How does one reset the sqlite_sequence values? How about: UPDATE sqlite_sequence SET seq = 1 WHERE name = 'myTable'; ___ sqlite-users mailing list

Re: [sqlite] Reset value of sqlite_sequence

2018-02-10 Thread Stephen Chrzanowski
Half thought... SQLite Wrapper from Tim Anderson at itwriting.com On Sat, Feb 10, 2018 at 9:06 PM, Stephen Chrzanowski wrote: > Delphi Berlin 10.1 using his SQLite Wrapper from I don't know how long > ago. Its served me well in Delphi 7, but with the move to Unicode >

Re: [sqlite] Reset value of sqlite_sequence

2018-02-10 Thread Stephen Chrzanowski
Delphi Berlin 10.1 using his SQLite Wrapper from I don't know how long ago. Its served me well in Delphi 7, but with the move to Unicode materials, its got a few things to iron out that I've been able to work around in code. Like this threads sample. :] On Sat, Feb 10, 2018 at 8:51 PM, Simon

Re: [sqlite] Reset value of sqlite_sequence

2018-02-10 Thread Simon Slavin
On 11 Feb 2018, at 1:39am, Stephen Chrzanowski wrote: > What I had before was this: > db.ExecSQL('delete from sqlite_sequence where > name=?',[ansistring('Magazines')]); Oh dear. Don't you just hate getting lost in multiple text representations ? C++ Builder ? Delphi ?

Re: [sqlite] Reset value of sqlite_sequence

2018-02-10 Thread Stephen Chrzanowski
Did a bit more digging, and the code I wrote is doing what its supposed to do. There is (what I'm calling) a bug with the string handling in the wrapper (That I didn't write) I'm using that doesn't know how to deal with "strings" type, but it does work fine with ansistrings, and I think the

Re: [sqlite] Reset value of sqlite_sequence

2018-02-10 Thread Simon Slavin
On 11 Feb 2018, at 1:12am, Stephen Chrzanowski wrote: > How does one reset the sqlite_sequence values? See section 2.6.2 of When considering how to modify that table, pay attention to the last paragraph of that section.

[sqlite] Reset value of sqlite_sequence

2018-02-10 Thread Stephen Chrzanowski
How does one reset the sqlite_sequence values? I'm trying with [ delete from sqlite_sequence where name='...' ] but my app continuously goes and keeps adding up the number. If I go into a 3rd party tool and delete the table, the next time my app goes and populates data, the counter starts at 1.