[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
Thanks TIm On 13 August 2015 at 15:31, Tim Streater wrote: > On 13 Aug 2015 at 11:34, Chris Parsonson wrote: > > > Has anybody ever used this ATTTACH command? > > Here's what I do to move a row from one database to another (same > table/column defs). I have to go via

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
; "'C:\XYZ.jpg'," _ & "''" _ & ")" Dim dbcommand2 As SQLiteCommand = dbConnection.CreateCommand With dbcommand2 .CommandText = SQLStmt .ExecuteNo

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
In fact I found the database in the Documents folder. "C:\Users\Chris\Documents\UpdateWolfpro.db3" but it made no difference. But the ATTACH gives no error in either my first attempt or this second one. On 13 August 2015 at 10:45, R.Smith wrote: > > > On 2015-08-13 10:26

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
at doesn't exist > yet in the same named (with the same schema) table in the attached database > on a Primary key called "RecID", this SQL might work: > > INSERT INTO DB2.MyTable SELECT * FROM MyTable WHERE MyTable.RecID NOT > IN (SELECT RecID FROM DB2.MyTable); >

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
So can someone give me a working example of two database ATTACHed and a simple select using columns from a table in each database On 13 August 2015 at 07:13, Chris Parsonson wrote: > Now we get down to the first real problem that of the ATTACH. I have never > been able to get that to work

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
Server doing synchronisation there On 13 August 2015 at 07:08, Simon Slavin wrote: > > On 13 Aug 2015, at 5:55am, Chris Parsonson wrote: > > > The tables are very simple. They have a primary key, but no relationship > > between tables in the sense that you mean. Synchronisat

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
The tables are very simple. They have a primary key, but no relationship between tables in the sense that you mean. Synchronisation will be add new rows, and update some rows, no deletions On 13 August 2015 at 05:53, Simon Slavin wrote: > > On 13 Aug 2015, at 3:52am, Chris Parsonson

[sqlite] Database sybchronisation

2015-08-13 Thread Chris Parsonson
Hi SQLite people, I need to be able to synchronise some fairly simple table in two databases. Can someone help please Regards, Chris -- Chris Parsonson 083 777 9261

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
Dunno but I changed it and ran the code. It goes through without error but the DELETE still has not worked On 31 July 2015 at 11:36, Kevin Benson wrote: > On Fri, Jul 31, 2015 at 3:38 AM, Chris Parsonson > wrote: > > > Forgot to add the code > > Public Function Synch

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
UPD; > > Intead of > > ATTACH 'myfilepath' AS UPD; > > > > -Urspr?ngliche Nachricht- > Von: Chris Parsonson [mailto:z2668856 at gmail.com] > Gesendet: Freitag, 31. Juli 2015 09:10 > An: General Discussion of SQLite Database > Betreff: Re: [sqlite] ATTACH Pr

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
ilepath AS UPD; > > Intead of > > ATTACH 'myfilepath' AS UPD; > > > > -Urspr?ngliche Nachricht- > Von: Chris Parsonson [mailto:z2668856 at gmail.com] > Gesendet: Freitag, 31. Juli 2015 09:10 > An: General Discussion of SQLite Database > Betreff: Re: [s

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
With dbcommand2 .CommandText = SQLStmt .ExecuteNonQuery() .Dispose() End With Return True Catch ex As Exception MessageBox.Show(ex.Message) Return False End Try End Function

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
red to Simon's suggestion. Also in your parameter-based attempt you > have a typo when assigning the path (@DNName instead of @DBName). > > Hope that helps, > -Rowan > > > On 31 July 2015 at 15:09, Chris Parsonson wrote: > > > That's exactly what I started with,

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
That's exactly what I started with, then somebody suggested using a parameter On 31 July 2015 at 09:02, Simon Slavin wrote: > > On 31 Jul 2015, at 5:32am, Chris Parsonson wrote: > > >SQLStmt = "ATTACH '" & sUpdateDBPath & "' AS U

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
d = dbConnection.CreateCommand With dbcommand2 .CommandText = SQLStmt .Parameters.AddWithValue("@TBName", "UPD.Items") .ExecuteNonQuery() .Dispose() End With On 31 July 2015 at 06:42, Chris Parsonson wro

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
No, but I can do that On 31 July 2015 at 06:41, Joe Mistachkin wrote: > > Chris Parsonson wrote: > > > > > > The first thing I need to do with the second database is ATTACH it > > to the first one. This is what I haven't been able to do successfully.

[sqlite] ATTACH Problem

2015-07-31 Thread Chris Parsonson
SQLStmt = "DELETE FROM UPD.Items" Dim dbCmd2 As New SQLiteCommand(SQLStmt, dbConnection) dbCmd2.ExecuteNonQuery() Return True Catch ex As Exception MessageBox.Show(ex.Message) Return False End Try End Function End Module -- Chris Parsonson 083 777 9261