cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
TonyRivers
Level II

File > Database > Save Table - JMP13 scripting help

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

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.

 

View solution in original post

8 REPLIES 8
guy_yosef
Level III

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

TonyRivers
Level II

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

Jeff_Perkinson
Community Manager Community Manager

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.

 

JMPScreenSnapz103.png

-Jeff
TonyRivers
Level II

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

 

 

ian_jmp
Level X

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.

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.

 

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

TonyRivers
Level II

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