cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
douglaschong
Level I

How to close database connection after running a New Sql Query?

Steps to reproduce:

 

Run any new sql query:

 

query << Run Foreground(
	OnRunComplete(
		Write( "Number of rows in query result: ", N Rows( queryResult ) )
	)
);

MyRunCompleteFunc = Function( {dt},
	{Default Local},
	Write( "Number of rows in query result: ", N Rows( dt ) )
);
query << Run Foreground( OnRunComplete( MyRunCompleteFunc ) );

Next, if you try to delete the database, it will say that jmp is still using the database.

 

Is there a way to close the database connection? The function Close Database Connection() does not seem to do the trick.

 

1 REPLY 1
Gerry_R
Level I

Re: How to close database connection after running a New Sql Query?

I have exactly this same question.  I have a database that does not deal well with non-terminated connections and can't always use Open Database Connection()/Close Database Connection with a DSN name..if I use an ODBC:driver string, I have to use New SQL Query, but I don't see a way to close it when finished.

Recommended Articles