IronPython WPF program closing after SQLite DB is created - Overclock.net - An Overclocking Community

Forum Jump: 

IronPython WPF program closing after SQLite DB is created

 
Thread Tools
post #1 of 4 (permalink) Old 11-18-2019, 02:59 PM - Thread Starter
New to Overclock.net
 
Join Date: Apr 2009
Location: Cincinnati Ohio
Posts: 4,409
Rep: 172 (Unique: 146)
IronPython WPF program closing after SQLite DB is created

I am creating an IronPython WPF application in Visual Studio 2019 that also integrates an SQLite database. The issue I am having is that the GUI closes immediately with a return code of 1 after it executes the python script that creates the SQLite database. The script includes some test data that should load into the DB but that doesn't happen either. If I remove the call to the file, it will run without issue but its just a GUI at that point.

Below is the code for the WPF load and GUI interaction. Don't mind the silliness, some of it was done at 2am and I was a bit slap happy and tired. As you can see, in my current iteration it uses execfile to run the other python script to create the DB and load it. You can also see where I imported it to try calling it and the SQLClass too but that also did not work properly.

Spoiler!


This is the code for the SQLite DB creation and test data load.
Spoiler!


This is the output field in Visual Studio after running the application and having it immediately close
Spoiler!

. . .
Ever Evolving
(18 items)
CPU
Phenom II 1090T Black Edition
Motherboard
Gigabyte GA-890FXA-UD5
GPU
Diamond R9 280X
GPU
XFX R9 280X
RAM
Crucial Ballistix Sport 16GB VLP DDR3 1600 CL9 1.35v
Hard Drive
Vertex 3 120GB SSD
Hard Drive
2x WD 1TB Caviar Black SATA3
Hard Drive
WD Caviar Black 640GB SATA2
Optical Drive
HP DVD-RW 1170i
Power Supply
Corsair HX1000W
Cooling
Prolimatech Megahalem
Cooling
2x Delta AFB1212SHE
Cooling
7x Cooler Master SickleFlow R4 fans
Case
Cooler Master HAF932 (Fan Mod)
Operating System
Windows 10 Professional
Monitor
2x Samsung SyncMaster E2420 23.6" 1920x1080
Keyboard
Logitech G15
Mouse
Logitech MX310
▲ hide details ▲
NameUnknown is offline  
Sponsored Links
Advertisement
 
post #2 of 4 (permalink) Old 11-20-2019, 09:13 AM - Thread Starter
New to Overclock.net
 
Join Date: Apr 2009
Location: Cincinnati Ohio
Posts: 4,409
Rep: 172 (Unique: 146)
Bumping for renewed attention...Really need some assistance with this issue.

. . .
Ever Evolving
(18 items)
CPU
Phenom II 1090T Black Edition
Motherboard
Gigabyte GA-890FXA-UD5
GPU
Diamond R9 280X
GPU
XFX R9 280X
RAM
Crucial Ballistix Sport 16GB VLP DDR3 1600 CL9 1.35v
Hard Drive
Vertex 3 120GB SSD
Hard Drive
2x WD 1TB Caviar Black SATA3
Hard Drive
WD Caviar Black 640GB SATA2
Optical Drive
HP DVD-RW 1170i
Power Supply
Corsair HX1000W
Cooling
Prolimatech Megahalem
Cooling
2x Delta AFB1212SHE
Cooling
7x Cooler Master SickleFlow R4 fans
Case
Cooler Master HAF932 (Fan Mod)
Operating System
Windows 10 Professional
Monitor
2x Samsung SyncMaster E2420 23.6" 1920x1080
Keyboard
Logitech G15
Mouse
Logitech MX310
▲ hide details ▲
NameUnknown is offline  
post #3 of 4 (permalink) Old 11-21-2019, 09:27 AM - Thread Starter
New to Overclock.net
 
Join Date: Apr 2009
Location: Cincinnati Ohio
Posts: 4,409
Rep: 172 (Unique: 146)
I think I may be on to something with this. If I run the file that creates the SQLite DB from the console without the app being involved, I get a syntax error at the end of the first line of the insert command. I am going to change this to work with a tuple and see if that helps.


also....bump

. . .
Ever Evolving
(18 items)
CPU
Phenom II 1090T Black Edition
Motherboard
Gigabyte GA-890FXA-UD5
GPU
Diamond R9 280X
GPU
XFX R9 280X
RAM
Crucial Ballistix Sport 16GB VLP DDR3 1600 CL9 1.35v
Hard Drive
Vertex 3 120GB SSD
Hard Drive
2x WD 1TB Caviar Black SATA3
Hard Drive
WD Caviar Black 640GB SATA2
Optical Drive
HP DVD-RW 1170i
Power Supply
Corsair HX1000W
Cooling
Prolimatech Megahalem
Cooling
2x Delta AFB1212SHE
Cooling
7x Cooler Master SickleFlow R4 fans
Case
Cooler Master HAF932 (Fan Mod)
Operating System
Windows 10 Professional
Monitor
2x Samsung SyncMaster E2420 23.6" 1920x1080
Keyboard
Logitech G15
Mouse
Logitech MX310
▲ hide details ▲
NameUnknown is offline  
Sponsored Links
Advertisement
 
post #4 of 4 (permalink) Old 11-21-2019, 01:26 PM - Thread Starter
New to Overclock.net
 
Join Date: Apr 2009
Location: Cincinnati Ohio
Posts: 4,409
Rep: 172 (Unique: 146)
Using Tuples was the solution. I was able to implement them in a console version of the file without issue and then importing that version in my application allows it to create the file and load the test data without issue. Consider this portion of the application resolved....However I keep running into roadblocks everywhere I turn so I am sure I will be back with more problems and thus likely keep updating with issues here.


For instance, when I query the database I can print to a console but not save to a variable??

. . .
Ever Evolving
(18 items)
CPU
Phenom II 1090T Black Edition
Motherboard
Gigabyte GA-890FXA-UD5
GPU
Diamond R9 280X
GPU
XFX R9 280X
RAM
Crucial Ballistix Sport 16GB VLP DDR3 1600 CL9 1.35v
Hard Drive
Vertex 3 120GB SSD
Hard Drive
2x WD 1TB Caviar Black SATA3
Hard Drive
WD Caviar Black 640GB SATA2
Optical Drive
HP DVD-RW 1170i
Power Supply
Corsair HX1000W
Cooling
Prolimatech Megahalem
Cooling
2x Delta AFB1212SHE
Cooling
7x Cooler Master SickleFlow R4 fans
Case
Cooler Master HAF932 (Fan Mod)
Operating System
Windows 10 Professional
Monitor
2x Samsung SyncMaster E2420 23.6" 1920x1080
Keyboard
Logitech G15
Mouse
Logitech MX310
▲ hide details ▲
NameUnknown is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off