cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
miguello
Level VI

Problems with Execute SQL: JMP crashes, need help troubleshooting

I'm rewriting an old App to include more features. Part of the App is pulling some data from a database. I'm copying that code exactly as it was in the old App.

When I'm tyring to execute that code in the new app, JMP crashes violently. It was giving me some error windows, now it just stops running. It does produce crash reports, though, in "...AppData\Local\Temp\JMPCrashReports\13".

 

So, if I isolate the code in a new script window like this:

dbc = Create Database Connection("DSN=qwerty;DATABASE=qwerty;SERVER=xxx.xx.xx.xx;PORT=5432;");


query = "SELECT t1......
	FROM xxxxxxxx 
	WHERE  (  (  ( xxxxxxx IN  ( 'xxxxxx' )  )  AND  (  (time>= '05/07/2018 12:00:01 AM')  ) AND  (  (time<= '05/07/2018 3:31:13 PM')  )  )  ) ;";
	


DataTable = Execute SQL( dbc, query, "invisible", "Data");	

It runs just fine.

If I comment Execute SQL line in the App, it runs fine (well, except for the fact that it doesn't pull anything):

//DataTable = Execute SQL( dbc, query, "invisible", "Data");

But if I uncomment this line, JMP crashes and shuts down immediately upon execution. 

It looks like something else that exists when new App is running and that doesn't exist when a separate script or the old App are running prevents Execute SQL from running correctly.

 

Question: Any ideas on how to troubleshoot it further? I looked at the crash report - doesn't explain much. Anywhere I could send those reports?

 

Thanks, 

M.

2 REPLIES 2
Jeff_Perkinson
Community Manager Community Manager

Re: Problems with Execute SQL: JMP crashes, need help troubleshooting

I'm sorry that you're running into difficulty here.

 

Yes, please contact Technical Support, support@jmp.com, with the crash reports and as much detail as you can about when the crash occurs. They can help identify the cause and possibly provide some workarounds if the crash hasn't already been addressed in newer release.

-Jeff
miguello
Level VI

Re: Problems with Execute SQL: JMP crashes, need help troubleshooting

Ok, it looks like Execute SQL isn't working with an active subscription to Data Table List.

One of the addition to the new version of the App is this listener:

aSub = Subscribe to Data Table List( , OnOpen( fnew ) );
Subscribe to Data Table List( aSub,    OnRename( fnnme ) );
Subscribe to Data Table List( aSub,    OnClose( fclose ) );

So, if I close it right before execution of the SQL, it works fine:

Unsubscribe to Data Table List(aSub, All);
DataTable = Execute SQL( dbc, query, "invisible", "dataTable");

I guess, if I subscribe again as soon as I pulled the table, this won't break any of the functionality?

Also, does it seem to be a bug, or I'm using subscription not the right way?

 

Thanks, 

M.