BookmarkSubscribe
Choose Language Hide Translation Bar
Jessica1
Community Member

How to lock a table from a database

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

 

0 Kudos
1 REPLY 1
msharp
Super User

Re: How to lock a table from a database

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.