05-01-2024 03:00 AM
I want to use a python code to create a custom report for my team, I think that reading the values from the database would be more comfortable than parsing and manipulating an xml file.
when I try to connect to the database, I'm promoted with an error that says that "sqlite3.DatabaseError file is not a database file", I connect to the Teststand Results.mdb file from the C:\\Users\\Public\\Document\\National Instruments\\Teststand 2020 (32-bit)\\Component\\Model\\Teststand Results.mdb path and I'm using the python library sqlite3 to attempt to connect.
Strangely, the error doesn't occur when I'm connecting (with the command sqlite3.connect("C:\\Users\\Public\\Document\\National Instruments\\Teststand 2020 (32-bit)\\Component\\Model\\Teststand Results.mdb")) but rather when I'm attempting to perform the query (with the command sqlite3.execute("select * from UUT_RESULTS"))
Am I doing something wrong? is there a guide that I can follow about this?
05-02-2024 12:00 AM
Just an educated guess.... are you sure the database format choosen works with your sql toolkit?
Sounds like they kinda understand each other, but not entirely...
05-02-2024 02:20 AM
that is part of my question, if I need to change the toolkit I will but I wonder if I have done it all as expected
05-02-2024 02:48 AM
Would you mind sharing your Database Result Processing Options?
Screeshots will do!
05-02-2024 07:24 AM
sadly, my workstation is an offline station, but I will try to describe the fields as accurate as I can:
in the logging\data link option, the logging options are set to include execution time but not to use on-the-fly report and not to use transaction processing.
in the datalink options, the selected database management system is access, and the connection string expression is a path to the Teststand Results.mdb as I pointed in my original question.
if it is relevant, the include step results option has everything enabled (I mean the measurements, test limits and additional results, also the result filtering expression is set for all results)
05-02-2024 08:12 AM
Have you already tried the interaction of some dummy Access DB and your Python lib to exclude TestStand as a "source of trouble" ?
05-08-2024 03:35 AM
I don't think that I fully understand your question
I can access the database by using access and with the teststand data viewer, if that is what you meant
05-08-2024 04:07 AM
Let me re-phrase:
Have you tried using the sqlite3 packages with a different Access Database than the one created with TestStand?
--> is the sqlite3 able to speak to Access?
05-16-2024 07:25 AM
after careful examination, I can say that my code (using the sqlite3 package) cannot connect any of the access database file: .mdb(97-2000), .mdb(2000-03) and .accdb
for any of the version of access available on my machine the result was with the same error message
I wonder why it happens on my machine, should I use any other database?