Until now, i was developing client applications using jbuilder 2 and
oracle 8i database and oracle jdbc driver.
when i wanted to lock a number of rows, i used directly my JDBC connection
as the follow:
...........................................
Database database1 = prog.DataModule1.getDataModule().getMainDatabase();
QueryDataSet queryDataSet1 = new QueryDataSet();
ParameterRow pr = new ParameterRow();
..................................
pr.addColumn(new Column("test","",borland.jbcl.util.Variant.STRING));
..................................
queryDataSet1.setQuery(new borland.sql.dataset.QueryDescriptor(database1,
"SELECT * FROM STOCK.S200 WHERE S200.COD1 = :test FOR UPDATE NOWAIT ",
pr, true, Load.ALL));
................................
try {
database1.commit();
database1.getJdbcConnection().setAutoCommit(false);
} catch (SQLException ioex) {ioex.printStackTrace();}
pr.setString("test",o_COD1.getValue().trim());
queryDataSet1.executeQuery();
...........................................
now i've changed the database. I'm trying to use SQL Server 2000 and ODBC
driver.
how can i the previous thing in SQL Server 2000?
could you help me?
thank you in advance