When I tried use the driver I get a message saying No suitable driver found
when Connection is created
Connection con = new Connection(url,properties);
this is the line where it gives the error
|
Have you called "Class.forName("com.hxtt.sql.dbf.DBFDriver");"?
What's your url?
|
How do use the lock and unlock commands in Foxpro in java
|
Please use lockType property to enable Xbase compatible lock:
properties.put("lockType","VFP");
DBF driver will lock and unlock automatically when you execute SQL through DBF driver. ROWLOCKED([nWorkArea | cTableAlias]) function indicates whether the current row has been locked by other process or application. For instance, "SELECT rowlocked() from test where recno()=1000", and "SELECT rowlocked('test'),* from test".
LOCK TABLE and UNLOCK TABLE sql can do manuall lock, but you needn't that function in fact. Set Record Lock Manually discusses record lock manually.
In conclusion, you need only lockType and common insert/update/delete/select sql if you haven't special requirement.
|