Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nzmike

Pages: [1]
1
I was just googling about general ODBC connections to third party apps (so not TP specific) and a couple of sites said to use the new driver.  It  could be something to do with the fact I also upgraded to SQL Server 2019 for my new PC, perhaps the native driver is just not tuned for the new version because my old PC (on SQL 2017)   used the native driver and it was very fast.

2
Thanks for the suggestions everyone.   

I had installed from an older TP10 .exe file so re-installed the latest version from the site.
Then from a bit more googling I realised I needed to set up the system DNS using the ODBC for SQL Server 2017 driver rather than the native SQL Server driver.  Once I restarted TP and connected to the new DB everything was back to normal as running as fast I expected :-)


3
I found the log in %appdata% so here is the last few lines from clicking on folders - these have almost no images in them yet we can see it's taking 8 seconds to build them!

Init.c(1701):        @  50.141( 0.016) [Startup] Initialize shell icon and thumbnail access
tp8ui.cpp(158):      @  50.157( 0.016) [Startup] Show, place and update main window pane
Thumbs.c(1335):      @  50.188( 0.031) [Trace] Refry file list; flags: 00000012
 >'E:\Pics'<
overlord.cpp(249):   @  50.235( 0.047) t7480<Overlord> [Trace] Startup cleared 50.219 seconds after start
Thumbs.c(1472):      @  58.407( 8.172) [Trace] Built file list in 8.219 secs. 32 files (32 total), 34 thumbnails (34 total)
Thumbs.c(1335):      @ 299.578(241.171) [Trace] Refry file list; flags: 00000002
 >'E:\Pics\Blk'<
PropPane.cpp(257):   @ 299.594( 0.016) [Startup] Expanded Info Tab categories initialized. Expanded items: 3. List size: 15 chars. Items = ';Info;Metadata;'.
Thumbs.c(1472):      @ 307.813( 8.219) [Trace] Built file list in 8.235 secs. 47 files (47 total), 47 thumbnails (47 total)
Thumbs.c(1335):      @ 315.828( 8.015) [Trace] Refry file list; flags: 00000002
 >'E:\Pics\Clb'<
Thumbs.c(1472):      @ 319.953( 4.125) [Trace] Built file list in 4.125 secs. 0 files (0 total), 0 thumbnails (0 total)
Thumbs.c(1335):      @ 319.953( 0.000) [Trace] Refry file list; flags: 00000002
 >'E:\Pics\Col'<
Thumbs.c(1472):      @ 328.282( 8.329) [Trace] Built file list in 8.329 secs. 202 files (202 total), 203 thumbnails (203 total)

4
Ok, so just built a new PC with 1 x M.2 drive (C:) where TP10 is installed.
I use a SQL Server database with TP10 via an ODBC connection (System DSN) and that resides on a second 7000MB/s 1TB WD SN850 M.2 drive.  My picture folders are on a 750GB SATA6 disk which is not slow (though I'll likely move them on the SN850 soon).

So I installed TP10 on my new PC and now every single time I go into a folder it says "Building file list" and takes ages to do it. If I switch to another folder and switch back it does exactly the same even though it just built the list a few seconds ago!!
If I try to scroll it then stops after half a page and seemingly has to regenerate all the thumbs.

For years I've used this combo (TP10 and SQL Server DB) on my old PC and there was almost no delay selecting folders - images appeared almost instantly and scrolling was not an issue. Most of my folder have between 50-1500 images in them so they are not massive but every single folder takes ages to build the list so it's like nothing is being cached or saved or whatever.

Even doing CTRL-K to add keywords is taking up to 10 seconds just to appear then 10-20 seconds to assign keywords.

I've checked all the settings in TP10 on my old PC against my new PC and they are  *exactly* the same.

If anything it should be *much* faster than my old PC given my M.2 drives but it's running like an dog with three legs.

I've checked everything I can think of with no luck - can anyone suggest anything?
Is there a log I can view to see if there is some sort of permissions issue or something?

I rely on TP10 big time for my business (supplying property photos to the real estate industry) so I need it to work properly - any help or suggestions would be greatly appreciated. 

5
> Well, adding keywords to the database, versus adding them to an image's own IPTC header, are two different actions

I'm aware of that, what I was hoping was there an option I could set to always write/update/delete (in other words "synch") keywords in the DB with the image.

> you'd use the Image | Batch Edit Metadata command (from the menu, not available through tpcmd).

That is a nice little tool in TP which I will use if I don't write a C# program to do it with ExifTool.  I haven't used it too much yet but hopefully I can select all child folders and then run the Batch Edit Metadata command, that would help me get the keywords into the files.

It's not something I have a huge amount of time to look at now due to other work coming in but I got my main problem solved of getting keywords assigned for new/cropped images via my photography workflow app but I really appreciate your input and help :-)

6
Thanks again for the input Daan.

I ended up adding the keywords via C# and a SQL Server stored procedure - it's faster and works every time. In hindsight I should have taken this approach first off but I got lazy thinking TPCMD would do it for me. (Naughty programmer!!). The only time I call TPCmd in the whole exercise now is to do an UpdateAll() and then OpenDir() to update and re-select the folder so ThumbsPlus refreshes all the images.

One thing I've noticed is that when I assign keywords directly in TP it does not seem write the IPTC keywords to the image file - 'tags' is always empty when I look at the properties in Explorer. Is this an option somewhere or should this be happening by default? (I just searched for something like this in the TP options but can't see anything.)

Most of the JPG images I use do not have the ITPC keywords on them as they come from a variety of different places (hence using TP to make it easy to assign keywords) but having had a closer look at ExifTool I think I may write a small app in C# to take a bunch of images, grab their TP keywords from my DB and apply them to the images in case I ever have to rebuild my DB or switch to another app like Lightroom.

Thanks again for your suggestions, all very helpful :-)

7
Hi Daan,

Thanks for your reply - I wasn't sure if Cerious developers actually posted here but you have given me some new info so if I try that and still can't get it working I may just email support and ask them if they can help.

First, I didn't know TPCMD was pretty much part of TP7 - I only discovered it after I'd installed v8 and have not used it much until recently.  I did know it wasn't officially supported but given it was designed for for the previous generation of TP then that could explain the issues I'm having.  

After I posted yesterday I re-read the TPCMD readme file again and changed the way I did the script a little bit so I just put the Keyword commands in the script (without the tpcmd.exe bit) and ran it like this:

tpcmd -f cropimages.bat -l tpcmds.log -v

However this still gives the same result (random images with no keywords) and the log shows nothing except 'sending DDE command: ....' and then 'DDE command accepted by Thumbsplus'... none of them returned of an error or anything that suggested anything went wrong.

I do agree that I probably need to do the operations sequentially  but it does not look like the Keyword command has the wait parameter as some of the other commands do.  I have tried putting a pause between the commands (up to 2 seconds) but I get the same result.  I also can't see anything in the tpcmd readme file that mentions using /start or /wait or /B - can you elaborate a bit on this?  

Thanks for the tip about ExifTool - if I use that and assign the keywords directly to the image does ThumsPlus pick those up when you add the image?  If so then that could the best option.

The other potential issue is that I use SQL Server 2012 as my Pics DB so maybe the DDE commands are actually being rejected or not handled by SQL Server correctly.

I'm thinking the best alternative is just to insert or update the keywords in the database directly via C# and SQL commands. I use SQL Server 2012 as my Pics DB so can easily alter the database - maybe I just do this then issue an UpdateAll() command on the folder so ThumbsPlus then shows the assigned keywords.

Thanks again for the reply - much appreciated.

8
I'm not sure if anyone here can/will help because I know that officially TPCMD is not supported but here goes nothing...

Say I have 20 images, Pic001.jpg thru Pic020.jpg freshly added to a folder managed by TP10.  Thumbnails are created and all look good in the program.  I then have a batch file with 20 Keyword commands in it, like so:

tpcmd.exe Keyword("+mountain;+lake;+snow|d:\pics\landscapes\pic001.jpg")
tpcmd.exe Keyword("+desert;+snow;+mountain|d:\pics\landscapes\pic002.jpg")
..etc...
tpcmd.exe Keyword("+river;+waterfall;+jungle|d:\pics\landscapes\pic020.jpg")

The problem is that when I run this script (or any variation on it) to add keywords to a number of images only some of the images in the folder will get keywords assigned, the rest get nothing.  This appears to be random because if I recreate the new images again (or delete all assigned keywords) and run the script again, different images will not get keywords assigned.  Sometimes it's only 2 or 3 and sometimes it's up to half or more of them, but it's never the same twice.

The above example is a very simplified use-case - my real world situation is that the script is auto-generated as part of a C# image management app that I have developed and it doesn't matter if the script is executed from the app or if I run it standalone using cmd.exe, I've never yet seen all the images get assigned their keywords.

Can anyone at Cerious tell me why this would be happening?  Can TP10 only handle a certain amount of TPCMD requests at once? Am I flooding it with too many commands which are not being queued in TP10 correctly?

I have tried catching the output of the commands (when submitting via my C# app) hoping to get an error message or a code or something that gives me a hint of what is going on but the commands do not seem to return anything - am I correct in this?  If not, what is returned and how can I capture it?

I have also noticed other TPCMD commands submitted as part of a script often do not get executed so it seems like there is a definite issue with TP10 'losing' commands submitted via a batch file.

Anyway, just hoping someone can help me out because it stops my photography workflow and causes me a lot of wasted time and effort having to assign custom keywords manually in TP10.

9
ThumbsPlus v7-v9 Questions / So, where to from here...?!
« on: 2011-06-22 05:50:48 »
OK, thanks - I'm going to be on holiday pretty soon until the beginning of August so won't get a chance until then to look at it.... still happy to try and help if I can though.

10
ThumbsPlus v7-v9 Questions / So, where to from here...?!
« on: 2011-06-21 05:00:29 »
Thanks - I will try that as I've heard nothing back from Philip who I thought was going to contact me perhaps with the script I could have worked on.  :-(

11
ThumbsPlus v7-v9 Questions / So, where to from here...?!
« on: 2011-06-01 02:04:14 »
I appreciate this is now a known issue but I know realistically it may take you a very long while before you can look at this and in the meantime I'm missing out on all the new features of TP8... and I've had it licensed (but unuseable) since it first came out (early 2010 IIRC).  I promised my clients lots of new features when TP8 came out and it's pretty embarrassing not to have been able to deliver them.  (Not to mention I've lost a couple of clients due to this.)

So, as I said, in my original post is there any way at all I can just get the current script you have to do the conversion - or perhaps just one to create a new, empty SQL Server DB for TP8?  (I'm puzzled as to why there is no such script on your site as there was for TP7.)

I design, build and program SQL Server DB's for a living so I am absolutely happy to play with this myself and can guarantee whatever I break I will not hold Cerious in any way responsible - as long as I have backups of my TP7 DB I should be fine.  (And besides, I'd only experiment with test DB's anyway).

Also, if I do work out a script that works for me I am 100% happy to then share it here for Cerious or anyone else in the same situation as me to use (though the same applies - I can't be responsible for anyone else's database breaking or not working etc).

Apologies for being so darned persistent but as you can probbaly tell I'm desperate to get TP8 going with SQL Server so I'd *REALLY, REALLY* appreciate being able to try and get this sorted ASAP even it means do it manually myself.

Thanks,

Mike

12
Error log from the conversion tool - see post above.  I've marked in red where I think at least some of the errors are - seems to trying to drop tables that are views and create tables that haven't been dropped!

Opening database for conversion.
Identifying database...
Database server type is Microsoft SQL Server.
Mappings: {'TEXT': 'ntext', 'COUNTER': 'int identity primary key clustered', 'FLAG': 'bit', 'INT64': 'bigint', 'DATE': 'varchar(32)', 'ID': 'int', 'INT32': 'int', 'INT16': 'smallint', 'BIN64': 'binary(64)', 'BLOB': 'image', 'WCHAR': 'nvarchar'}
Removing pre-v7 cruft.
Exec (nocheck): drop table [ActiveUsers]
Exec (nocheck): drop table [CurrentUsers]
[3701-42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table 'CurrentUsers', because it does not exist or you do not have permission
Exec (nocheck): drop table [Logins]
[3701-42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table 'Logins', because it does not exist or you do not have permission
Exec (nocheck): drop table [DoesPathHaveThumbs]
[3701-42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table 'DoesPathHaveThumbs', because it does not exist or you do not have permission
Exec (nocheck): drop table [GalleryThumbStart]
[3705-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use DROP TABLE with 'GalleryThumbStart' because 'GalleryThumbStart' is a view. Use DROP VIEW

Exec (nocheck): drop table [GetThumbnail]
[3701-42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table 'GetThumbnail', because it does not exist or you do not have permission
Exec (nocheck): drop table [KeywordByFile]
[3705-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use DROP TABLE with 'KeywordByFile' because 'KeywordByFile' is a view. Use DROP VIEW

Exec (nocheck): drop table [KeywordGroupCount]
[3701-42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table 'KeywordGroupCount', because it does not exist or you do not have permission
Exec (nocheck): drop table [ThumbnailGallery]
[3705-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use DROP TABLE with 'ThumbnailGallery' because 'ThumbnailGallery' is a view. Use DROP VIEW
Exec (nocheck): drop table [ThumbnailPath]
[3705-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use DROP TABLE with 'ThumbnailPath' because 'ThumbnailPath' is a view. Use DROP VIEW
Exec (nocheck): drop table [ThumbnailUDF]
[3705-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use DROP TABLE with 'ThumbnailUDF' because 'ThumbnailUDF' is a view. Use DROP VIEW

Exec (nocheck): drop table [UpdatePathNames]
[3701-42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the table 'UpdatePathNames', because it does not exist or you do not have permission
Creating new tables.
Exec (nocheck): create table [ThumbsPlusDatabase] (
[attribute] nvarchar(50) not null primary key,
[value]     nvarchar(255) not null
)
[2714-42S01] [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'ThumbsPlusDatabase' in the database
Exec (nocheck): create table [FoundLists] (
[idList"     int not null primary key,
[ListName]   nvarchar(255) not null,
[TableName]  nvarchar(255) not null,
[SQLText]    ntext,
)
[2714-42S01] [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'FoundLists' in the database
Exec (nocheck): alter table [FoundLists] add constraint [U_FoundListName] unique ([ListName])
[1750-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'U_FoundListName' in the database.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint. See previous errors
Exec (nocheck): create table [FoundThumbs] (
[idList]     int not null,
[idThumb]    int not null,
[flags]      int not null,
)
[2714-42S01] [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'FoundThumbs' in the database
Exec (nocheck): alter table [FoundThumbs] add constraint [PK_FoundThumbs] primary key ([idList], idThumb])
[8180-42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark after the character string ')'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared
Setting database attributes.
  setting attribute 'thumbnail_width' = '100'.
[3621-01000] [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK__ThumbsPlusDataba__4D94879B'. Cannot insert duplicate key in object 'dbo.ThumbsPlusDatabase'.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated
Upgrade failed at: 'select * from [DatabaseInfo]'.

Conversion failed!

13
Hi guys,

First, thanks for coming back from the dead and offering support again - I'd given up on TP8 completely as not one of my emails on this subject (or any other) has been answered since Jan 2010 when I first installed it so it's nice to see you back.

Anyway, enough complaining! As the title suggests, I am unable to convert my SQL Server 2005 database from the TP7 schema to the TP8 one as I get many many errors.

I am a professional SQL server and .Net developer so I am very happy to experiment with the script you had to do the conversion.... if only I could get it.  I am really, really keen to switch to TP8 (I paid for it after all!) but I can't until the conversion script works as I have a massive DB of images in my TP7 database and I can't switch to any other format as all my supporting code depends on my TP db being in SQL Server.

I have posted the output of the conversion tool in a seperate post as it was too long to include in this.

TIA for any help or advice you can offer.

Mike

Pages: [1]