home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Emulators
Updating description, year and company
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dir" data-source="post: 354939" data-attributes="member: 24485"><p>I've tried reducing the code/update down to the smallest level.</p><p></p><p>1. I make a copy of a good database that I can open (without crashing) in the MyEmulator configuration add-in, then </p><p></p><p>2. Run sqlite3.exe using the following:</p><p></p><p>CREATE TABLE temp (title varchar(100), description varchar(200), yearmade varchar(4), company varchar(50), visible varchar(5));</p><p>.separator ;</p><p>.import ./mame3.csv temp</p><p>UPDATE GAMES SET visible = (SELECT visible FROM TEMP WHERE TEMP.TITLE = GAMES.TITLE);</p><p>DROP table temp;</p><p></p><p>and with mame3.csv having only the following single line:</p><p></p><p>asteroid;Asteroids (rev 2);1979;Atari;False</p><p></p><p>3. Then re-run the configurator, and it crashes during open.</p><p></p><p>Somehow I'm corrupting the database with this single, simple but clearly wrong record.</p><p></p><p>If I change the UPDATE statement to update the description, year made, etc. it works fine. It only fails if I try touching this 'visible' field.</p><p></p><p>I can't figure out why I can't write "true" or "false" into a record without the app crashing with the boolean error. Somehow what I'm writing is being stored differently in the database then when the config program writes it.</p><p></p><p></p><p>Will have to puzzle my puzzler some more!</p><p></p><p>I should point out that I don't really want to muck around with the database, which just leads to supportability issues. But I need a simple way to update the Visible flag to make the Mame collection a bit more manageable.</p><p></p><p>Ok, I'm making progress. I think the problem's with my SQL statements or something.</p><p></p><p>The following works:</p><p>c:\blah\sqlite3.exe myEmulators3.db3</p><p>update games set visible = "false" where games.title = "asteroid";</p><p>.exit</p><p></p><p>This changes the record from</p><p></p><p>\\MOFO\Mame\Mame\roms\asteroid.zip|0|asteroid|0|0|0|1/01/0001 12:00:00 AM||||True|False</p><p></p><p>to </p><p></p><p>\\MOFO\Mame\Mame\roms\asteroid.zip|0|asteroid|0|0|0|1/01/0001 12:00:00 AM||||False|False</p><p></p><p>and doesn't crash the configurator.</p><p></p><p>The previous attempts where changing the record to</p><p></p><p>\\MOFO\Mame\Mame\roms\asteroid.zip|0|asteroid|0|0|0|1/01/0001 12:00:00 AM||||False|False</p><p></p><p>which causes it to crash.</p><p></p><p>If you're observant, you'll notice that the record that crashes the configurator appears IDENTICAL to the one that doesn't crash it. So there must be something hidden in the update method that I can't see. I think I need to find another way to do the sql UPDATE statement that doesn't do it the wrong way.</p></blockquote><p></p>
[QUOTE="dir, post: 354939, member: 24485"] I've tried reducing the code/update down to the smallest level. 1. I make a copy of a good database that I can open (without crashing) in the MyEmulator configuration add-in, then 2. Run sqlite3.exe using the following: CREATE TABLE temp (title varchar(100), description varchar(200), yearmade varchar(4), company varchar(50), visible varchar(5)); .separator ; .import ./mame3.csv temp UPDATE GAMES SET visible = (SELECT visible FROM TEMP WHERE TEMP.TITLE = GAMES.TITLE); DROP table temp; and with mame3.csv having only the following single line: asteroid;Asteroids (rev 2);1979;Atari;False 3. Then re-run the configurator, and it crashes during open. Somehow I'm corrupting the database with this single, simple but clearly wrong record. If I change the UPDATE statement to update the description, year made, etc. it works fine. It only fails if I try touching this 'visible' field. I can't figure out why I can't write "true" or "false" into a record without the app crashing with the boolean error. Somehow what I'm writing is being stored differently in the database then when the config program writes it. Will have to puzzle my puzzler some more! I should point out that I don't really want to muck around with the database, which just leads to supportability issues. But I need a simple way to update the Visible flag to make the Mame collection a bit more manageable. Ok, I'm making progress. I think the problem's with my SQL statements or something. The following works: c:\blah\sqlite3.exe myEmulators3.db3 update games set visible = "false" where games.title = "asteroid"; .exit This changes the record from \\MOFO\Mame\Mame\roms\asteroid.zip|0|asteroid|0|0|0|1/01/0001 12:00:00 AM||||True|False to \\MOFO\Mame\Mame\roms\asteroid.zip|0|asteroid|0|0|0|1/01/0001 12:00:00 AM||||False|False and doesn't crash the configurator. The previous attempts where changing the record to \\MOFO\Mame\Mame\roms\asteroid.zip|0|asteroid|0|0|0|1/01/0001 12:00:00 AM||||False|False which causes it to crash. If you're observant, you'll notice that the record that crashes the configurator appears IDENTICAL to the one that doesn't crash it. So there must be something hidden in the update method that I can't see. I think I need to find another way to do the sql UPDATE statement that doesn't do it the wrong way. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Emulators
Updating description, year and company
Contact us
RSS
Top
Bottom