09-26-2008 04:05 PM
I have created a custom Database Schema which I exported to a file from the 'Database Option' window. I was wondoring if there is a way to programatically Import the new schema. I would like to do this so that when I install the test software on a clean system there will not be a need to manually import the schema though the sequence editor.
Thanx in advance
john
09-28-2008 11:37 PM
John -
There is not a simple API to import the schema into the system. A more low-tech way is to add/replace the default TestStandDatabaseOptions.ini file in the Cfg directory with the copy that you have that has your customizations. This way the new system will have exactly the settings that your require.
04-28-2014 11:07 AM - edited 04-28-2014 11:19 AM
This was posted way back in 2008. Does this statement still hold true or is there now a way in TS 2012?
Update: I think I will try the ReadEx command similar to that which I used in the report options.
04-29-2014
03:16 PM
- last edited on
10-25-2024
02:01 PM
by
Content Cleaner
According to KB 37O9H144, if you are creating a TestStand deployment, then all you have to do is make sure to include the TestStandDatabaseOptions.ini
file in the deployment. If you are moving the schema without a deployment, you can use the export feature in theSchemas tab of the Database Options dialog box to generate an INI file. Then use the import feature to automatically load the schema in TestStand.
04-29-2014 03:21 PM
Got it. But in this case, we are not currently using a deployment, each machine will have the Dev Environment. And since my goal is to not stomp on anyone's personal settings or have to create instructions for each person (which could be anywhere in the world), I have created a way to modify the .ini file (if it exists) and insert my options. It's not elegant, but I believe it will work fairly well. I can get into more detail if you are interested.
04-29-2014 03:34 PM
It seems like using the import and export features of the Schema tab in the Database Options dialog would work. The export feature creates an INI file for your schema that can be loaded with the import function.
04-29-2014 03:42 PM
Yes, that can be done, but I'm forcing it through my client file/process model so that it has to use my version and not a possible modified version. The user will never know it happened, but at the same time, it will not affect any personal settings they may have for their own work. I'm basically doing the same thing an installer would do in a deployment.
02-01-2018
11:09 AM
- last edited on
10-25-2024
02:04 PM
by
Content Cleaner
Hi all,
Has anything changed on this matter? I've got a custom database results processor plugin that needs to "just work." Meaning, I want it to load its schema automatically.
I'd rather not swap out TestStandDatabaseSchemas.ini if I can help it... I suppose I could modify that file, but that's messy.
I notice that in this help article refers to the following method:
ReadDatabaseSchema (engine, schemaName, databaseSchema, fileDirectory)
However, it always looks for TestStandDatabaseSchemas.ini. Is there a similar function nowadays that isn't hard coded to look for that specific file?
It seems like programmatically modifying the .ini file may be my best option here...
08-21-2022
10:04 PM
- last edited on
10-25-2024
02:06 PM
by
Content Cleaner
FYI, the article I linked to above is now here:
09-29-2022 11:16 AM - edited 09-29-2022 11:16 AM
At long last, I have figured out at least one way to do this successfully and consistently. If this helps you out, kudos are always appreciated.
This probably isn't the only way to do it, but it's working for me.
I started writing a complete tutorial, but it ended up being very, very long.
Here's a summary:
Dynamically load the model plugins (easier said than done).
Of course there are many, many details that would go on for pages, but this is the basic methodology I'm using successfully.
P.S. NI, it sure would be nice if this were a bit easier and more intuitive.