Subscribe Bookmark RSS Feed

File > Database > Save Table - JMP13 scripting help

TonyRivers

New Contributor

Joined:

Jun 9, 2017

JMP13.bmp

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

1 ACCEPTED SOLUTION

Accepted Solutions
Dahlia_Watkins

Joined:

Jan 24, 2017

Solution

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.

 

8 REPLIES
guy_yosef

Community Trekker

Joined:

Jul 16, 2014

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");

TonyRivers

New Contributor

Joined:

Jun 9, 2017

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")

Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

I think you're looking for the Save Database() message.

 

You can find it in Help -> Scripting Index.

 

JMPScreenSnapz103.png

-Jeff
TonyRivers

New Contributor

Joined:

Jun 9, 2017

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[]

 

 

ian_jmp

Staff

Joined:

Jun 23, 2011

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.

Dahlia_Watkins

Joined:

Jan 24, 2017

Solution

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.

 

briancorcoran

Joined:

Jun 23, 2011

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

TonyRivers

New Contributor

Joined:

Jun 9, 2017

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