BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 eXtreme Movie Manager 8, 9, 10 Forum
 Bug Reports
 Ghost boxset

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
mon1y Posted - 08 Apr 2013 : 21:49:44
I have the id#3799 as an old ghost (old) boxset number. It doesn't exist. Let me explain: When I use the 3799 for a movie title - lets call it "Ghost" - it will attached itself to other numbers that formally was part of that boxset. Now a lot of Id numbers will become part of a boxset called Ghost. Even though there is no Boxset called Ghost. But if I deleted Ghost and don't use the 3799, everything is back to normal including the ID numbers that was previously part of that boxset. I can avoid using 3799 as movie id or use it and reedit others id numbers that shows up as a member of a boxset of 3799. This bug probably just happens in my XMM8 but it sure bugs me.
1   L A T E S T    R E P L I E S    (Newest First)
yan00s Posted - 09 Apr 2013 : 01:27:40
Here's a simple help function which should assist you cleaning the boxset table from orphaned entries (I think):


<!doctype html>
<html>
<head>
<meta http-equiv="x-ua-compatible" content="ie=edge">

<script type="text/vbScript">
	'
	' ------------------------------------------------------------
	' set path values
	' ===============
	'
	' set this values accordingly
	'
	currentPath = "Z:\my\xmm\dbfolder"
	currentDBname = "myxmmdatabasenamewithoutextension"
	'
	' ------------------------------------------------------------
	'
	' Local MS Access DB connection string
	strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & currentPath & "\" & currentDBname & ".mdb"
	'
	' ------------------------------------------------------------
	'
	' Cleanup BoxsetID
	'
	Function clrBoxID(boxID)
		'
		Set connWrite = CreateObject("ADODB.Connection")
		' Connect to the database
		connWrite.Open strConnect
		' delete records from table "boxsetlink"
		StrSQLDelBoxsetLinks = "DELETE FROM BoxsetLink WHERE BoxsetID =" & CInt(boxID) & ";"
		' do it now
		connWrite.Execute(StrSQLDelBoxsetLinks)
		connWrite.close
		'
		location.reload(true)
		'
	End Function
	'
	' ------------------------------------------------------------
	'
	' Get Boxsets and associated Movies
	'
	Set conn = CreateObject("ADODB.Connection")
	' Connect to the database
	conn.Open strConnect
	StrSQLListBoxSets = "SELECT BoxsetLink.BoxsetID, Movies_1.Title, Movies.MovieID, Movies.Title FROM (Movies RIGHT JOIN BoxsetLink ON Movies.MovieID = BoxsetLink.MovieID) LEFT JOIN Movies AS Movies_1 ON BoxsetLink.BoxsetID = Movies_1.MovieID ORDER BY Movies_1.Title, Movies.Title;"
	Set rsListing = conn.Execute(StrSQLListBoxsets)
	if not rsListing.EOF then
		arrBoxsets = rsListing.GetRows()
		countRows = UBound(arrBoxsets,2)+1
	else
		noarrBoxsets = "Nothing found"
		countRows = 0
	end if
	rsListing.close
	conn.close
	'
</script>
<title>Database Helper</title>
<style type="text/css">
body {
	font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	color: #FFF;
	background-color: #000;
}
.headerbox {
	border: thin solid #F30;
	border-radius: 6px;
	padding: 3px;
}
.btn-danger {
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-color: #da4f49;
  border-color: #bd362f #bd362f #802420;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
.missing {
	font-weight: bold;
	color: #C00;
}
.boxid {
	color: #CF0;
}
.warning {
	line-height: 20px;
	color: #F00;
}
</style>
</head>

<body>

<header class="headerbox">
  <h1>Simple DB Helper Function</h1>
</header>
<section class="main_1">
  <h2>Boxset Listing:</h2>
  <p>The following items are listed as boxsets:</p>
  <p><span class="boxid"><b>Boxset ID</b></span><b> | Boxset Title</b> | (associated) Movie: ID | Title</p>
  <script type="text/vbscript">
  if countRows > 0 then
	for i=0 to (CountRows-1)
		document.write("<p>")
        document.write("<em class='boxid'>" & arrBoxsets(0,i) & "</em> | " )
		if IsNull(arrBoxsets(1,i)) OR IsEmpty(arrBoxsets(1,i)) then
			document.write("<em class='missing'>There seems to be no boxset anymore in the db for this item</em>")
		else
			document.write(arrBoxsets(1,i)) 
		end if
		document.write(" | " & arrBoxsets(2,i) & " | " & arrBoxsets(3,i))
		document.write("</p>")
	next
	else
		document.write(noarrBoxsets)
	end if
  </script>
</section>
<section class="main_2">
  <h2>Delete Boxsets</h2>
  <p>Enter the ID of a boxset you want to delete (if everything goes well it will be gone forever ...):</p>
  <p>
    <input type="text" name="enteredboxID" id="textfield">
  </p>
  <p class="warning"><em>Note: There will be no check whatsoever if this is a valid ID nor if it is really a boxset. Right?</em></p>
  <p>
    <input name="button" type="button" class="btn-danger" id="button" onclick="clrBoxID(enteredboxID.value)" value="Delete this ID">
  </p>
</section>
<footer class="warning"><strong>Unsupported educational material - not part of any product / production release. Use at your own risk.</strong></footer>
</body>
</html>


- Save the code (everything between and including the html tags above) as a htm-file.
- Adapt the values marked red (path to database, name of database).
- Run it in Internet Explorer.
- It will probably complain about some active components. Those are the ADO functions (active x objects) used to access the db. If you are sure, allow it. It will not work in any other browser than IE on windows.
- [Edit] Forgot to mention: the listing should highlight items which are no longer associated to a boxset because the boxset does not exist. But: if there's a movie with an ID formerly known as associated to a boxset the listing will not mark it because it's just a stupid SELECT statement (won't matter if you have A. I. (tt0212720) in your movie db).
- Also the function will only alter the boxsetlink table (where the movie to boxset associations are stored). It will not delete Boxsets from the main movie table. This is something which should be done in XMM.


Before you use it: back up your database. Twice.
Note: the little function will not try to correct invalid user input. Not at all.

BTW: if we had referential integrity = primary keys this would not be needed.

BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.07 sec. Powered By: Snitz Forums 2000 Version 3.4.07