BookmarkSubscribeSubscribe to RSS Feed

How to lock a table from a database

Highlighted
Jessica1

Community Member

Joined:

Jun 12, 2018

Is it possible to lock a table coming from a SQL query?

 

I've tried just locking the table but I've also tried converting my SQL query into a table and locking it. Neither worked.

Please see red text as example.

 

 

Query1=(Open Database("Example Query"));
Query1<<Run Foreground;
Wait(0);
Query1<<Set Edit Lock ("Modify Cells");
<<Make Into Data Table;
Close database connection(Query1)
 
<< Query1_tabulate=(Tabulate(
Show Chart( 1 ),
Show Control Panel( 0 ),
Add Table(
Column Table( Grouping Columns( :parameter ), Analysis Columns( :value ) ),
Row Table( Grouping Columns( :XX, :YY ) )
));
 
 )<< Make Into Data Table;
 Close(Query1_tabulate);

 

1 REPLY
msharp

Super User

Joined:

Jul 28, 2015

You can lock a table like so:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Lock Data Table( 1 );
// Now try changing a value in the data table.