- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
File > Database > Save Table - JMP13 scripting help
from http://www.jmp.com/support/help/13/Save_Data_Tables_to_a_Database.shtml#223403
Does anyone have the scripting syntax for this feature?
Any help appreciated
Tony
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
What is happening is the redundancy of the database being referenced twice in the Save Database ( ) argument, similar to the below.
dt << Save Database( "DSN=DSN;Trusted_Connection=Yes;APP=JMP;WSID=LOCALHOST;DATABASE=Practice;Network=NETWORK;", "[Practice].[dbo].[GLUTF]" );
Removing the database reference in the SQL statement so it resembles the below, allowed the save.
dt << Save Database( "DSN=DSN;Trusted_Connection=Yes;APP=JMP;WSID=LOCALHOST;DATABASE=Practice;Network=NETWORK;", "[dbo].[GLUTF]" );
This was reported to Development to be addressed in a future release of JMP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
i am using simple save command
you need to map the location you want to save to
if dt1 call your "table1"
dt1 << Save("\\xxxpath\table1.jmp");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
Thanks - I may not have been clear on the post. I want to save a datatable to a SQL database as a new table.
The screen shot shows an option - File > Database > Save Table - where you can load a JMP table to a NEW dB table.
Using the GUI, this works but I am looking for the jsl behind the GUI as format used in earlier versions does not seem to work in JMP13
dt<<Save Database("connectInfo", "TableName")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
I think you're looking for the Save Database() message.
You can find it in Help -> Scripting Index.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
this is the format that I have been using in JMP9 & JMP11 but does not seem to work in JMP13.
dt<<Save Database("connectInfo", "TableName")
I get the following in the Log file but no actions happen n the SQL dB
Scriptable[]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
Version differences are probably best handled via an email to support@jmp.com, especially when something used to work and no longer appears to. You will find they are very responsive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
What is happening is the redundancy of the database being referenced twice in the Save Database ( ) argument, similar to the below.
dt << Save Database( "DSN=DSN;Trusted_Connection=Yes;APP=JMP;WSID=LOCALHOST;DATABASE=Practice;Network=NETWORK;", "[Practice].[dbo].[GLUTF]" );
Removing the database reference in the SQL statement so it resembles the below, allowed the save.
dt << Save Database( "DSN=DSN;Trusted_Connection=Yes;APP=JMP;WSID=LOCALHOST;DATABASE=Practice;Network=NETWORK;", "[dbo].[GLUTF]" );
This was reported to Development to be addressed in a future release of JMP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
Hi Tony,
Here is a simple example:
//This opens the JMPCARS table from SOMESCHEMA schema and gives it the title "mytest" //in JMP
dt =Open Database ("DSN=ORACLEDSN;DBQ=TheDBQ;UID=MyUID;pwd=MyPW", "SELECT * FROM SOMESCHEMA.JMPCARS", "mytest");
//Work on the data table or modify it in some way
dt << Save Database("DSN=ORACLEDSN;DBQ=TheDBQ;UID=MyUID;pwd=MyPW", "SOMESCHEMA.JMPCARS", Replace)
The "Replace" in this case is optional, but tells JMP to first perform a DROPTABLE action to remove the original table from the database, before attempting to save the current table to the database. If you don't specify Replace, then the table name specified must not already exist in the database or you will get an error.
Brian Corcoran
JMP Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: File > Database > Save Table - JMP13 scripting help
Thanks for all help - Unfortunately, I still have no joy with commands.
I now have a ticket open with JMP Technical Support to investigate this issue.
I'll update this discussion with resolution