INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: GetKey()  (Read 1485 times)

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
GetKey()
« on: July 01, 2006, 11:44:09 am »

Today I Was Looking Around And Found This In The SDK Doc

long GetKey()

Description: Gets the key of the file
Return Value: the key


What Is This GetKey?
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

dhill

  • Regular Member
  • Recent member
  • *
  • Posts: 16
  • Has anyone seen the bridge?
Re: GetKey()
« Reply #1 on: July 01, 2006, 02:32:52 pm »

It gets the key for the file. From my experience each file in the DB has a unique key what I believe is a number of the order that items are entered into the DB (DB item number). If an item is removed it just leaves a hole. So Key = last item entered key +1. 

If you have the key to a file you can get the IMJFileAutomation for the file using IMJAutomation.GetFileByKey which I would guess is faster than IMJAutomation.GetFile(Filename as String) since it does not require a search to find the item in the DB. Or add items to playlist using IMJCurPlaylistAutomation.AddFileByKey instead of IMJCurPlaylistAutomation.AddFile. I ran a test and adding ~12000 items using AddFile took ~21 sec. vs 9 sec. using AddFileByKey.

BTW these have been around for a while and only recently add to the SDK docs.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: GetKey()
« Reply #2 on: July 01, 2006, 03:08:32 pm »

oh

I was hoping for a fingerprint ID return value
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA
Pages: [1]   Go Up