Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT DBF
Locking the foxpro dbf in Sco Unix
Ahamed miftha
2006-08-16 07:32:41.0
I am using the HXTT DBF v3.0 to access the fox pro tables created in sco unix.

I can update , Select , and insertusing the setProperty("LockType","FOXPRO")

(No other type of DBF allow me to do all three of this)

but the prolem I have is the code updates the DBF even when it is locked by foxpro.

Is there a way that I can slove this problem.
Re:Locking the foxpro dbf in Sco Unix
HXTT Support
2006-08-16 07:41:23.0
>but the prolem I have is the code updates the DBF even when it is locked by foxpro.
It means that HXTT DBF failed to see that lock from Unix foxpro. You can try FOXBASE or SoftC type to see whether it can detect Unix foxpro's lock. I guess that SoftC should work normal. BTW, what's your Foxpro version? What's the suffix of index file, MDX, IDX, or CDX?
Re:Re:Locking the foxpro dbf in Sco Unix
HXTT Support
2006-08-16 18:46:45.0
You can download the latest package, and try FOXPRO4UNIX type now:)
Locking the foxpro dbf in Sco Unix
Miftha
2006-08-16 20:28:44.0
The unix forpro version 2.6 (FOXPRO 2.6 for UNIX) is the version we are using with SoftC it works correctly.But there is another problem.We are currently using a PRG files to access DBF, so we will have to run java and .prg files simultaneously for some time, the problem is when DBF is used with exclusive off the other programs must be able to access the DBF but now it shows the same exception.
Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
Miftha
2006-08-16 20:34:47.0
Our Index file is IDX
Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
Miftha
2006-08-16 20:36:49.0
Our Index file is IDX
:Re:Locking the foxpro dbf in Sco Unix
Nuwan J
2006-08-16 20:38:28.0

We are using FOXPRO 2.6 version for UNIX. When we using the HXTT DBF v3.0 to access the foxpro tables, I can update, Select, and inserting the setProperty("LockType","softc").
But we had a problem, when we are exclusive off a table using a foxpro application and simultaneously we try to select a query using the HXTT DBF v3.0 .But it doesn��t get a result set. We are using the IDX type indexes.
Re:Re:Re:Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
HXTT Support
2006-08-16 20:52:56.0
>update, Select, and inserting the setProperty("LockType","softc").
You should use lockType, not LockType. You should download the latest package and use FOXPRO4UNIX value.

>But we had a problem, when we are exclusive off a table using a foxpro >application and simultaneously we try to select a query using the HXTT DBF >v3.0 .But it doesn��t get a result set. We are using the IDX type indexes.
Try lockType=FOXPRO4UNIX , and let us know the error message.
Re:Locking the foxpro dbf in Sco Unix
Shervon
2006-08-16 21:45:33.0
We downloaded your updated trial version file, when setProperty("lockType","FOXPRO4UNIX") is used it does not identify that the dbf is locked by some one else when the DBF is used with exclusive or without exclusive it updates the DBF anyway.
Re:Re:Re:Re:Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
HXTT Support
2006-08-16 21:52:36.0
SoftC can detect exclusive mode?
Re:Locking the foxpro dbf in Sco Unix
Shervon
2006-08-16 21:56:01.0
We downloaded your updated trial version file, when setProperty("lockType","FOXPRO4UNIX") is used it does not identify that the dbf is locked by some one else when the DBF is used with exclusive or without exclusive it updates the DBF anyway.
Re:Re:Re:Re:Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
Shervon
2006-08-16 21:58:20.0
SoftC detects that the DBF is opened it doesn't know whether it is exclusively opened or sharedly opened
Re:Re:Re:Re:Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
HXTT Support
2006-08-16 22:27:30.0
Please read and run the following code in your SCO UNIX, and let us know the output information:

import java.sql.*;
import java.util.Properties;


public class testLock1 {

public static void main(String argv[]) {
try {
/* in FoxPro, run those command below:
SET REPROCESS TO 3 SECONDS
use test shared
brow
?rlock('3','test')
unlock record 3
?Flock()
unlock all
*/

String url="jdbc:dbf:///f:/dbffiles";
String sql4rowlocked="select recno() from test where rowlocked()";
String sql4tablelock="?tablelocked('test')";

String[] lockTypes=new String[]{"DBASE","DBASE4BDE","DBASEIII","DBASEIV","CLIPPER","CLIPPER5.3","PowerPlus","SoftC","FOXBASE","FOXPRO","FOXPRO4BDE","FOXPRO4UNIX","VFP"};

Class.forName("com.hxtt.sql.dbf.DBFDriver");

Properties properties = new Properties();

System.out.println("Try ?rlock('3','test') in VFP, and you will get true");
while(true){
int flag=System.in.read();
if(flag=='Y' || flag=='y' || flag=='C' || flag=='c'){
break;
}
}

for(int i=0;i< lockTypes.length;i++){
properties.put("lockType",lockTypes[i]);
Connection con = DriverManager.getConnection(url, properties);
Statement stmt = con.createStatement();
ResultSet rs=stmt.executeQuery(sql4rowlocked);
if(rs.next()){
System.out.print(lockTypes[i]+" lock type detects some record locks on:");
System.out.print(rs.getObject(1));
while (rs.next()){
System.out.print(","+rs.getObject(1));
}
System.out.println();
}
rs.close();
rs = null;

stmt.close();
con.close();
}

System.out.println("Try ?Flock() in FoxPro, and you will get true");
while(true){
int flag=System.in.read();
if(flag=='Y' || flag=='y' || flag=='C' || flag=='c'){
break;
}
}

for (int i = 0; i < lockTypes.length; i++) {
properties.put("lockType", lockTypes[i]);
Connection con = DriverManager.getConnection(url, properties);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sql4tablelock);
if(rs.next()){
if(rs.getBoolean(1)){
System.out.print(lockTypes[i]+" lock type detects table lock on:");
}
}
rs.close();
rs = null;

stmt.close();
con.close();
}

}catch (SQLException sqle) {
do {
System.out.println(sqle.getMessage());
System.out.println("Error Code:" + sqle.getErrorCode());
System.out.println("SQL State:" + sqle.getSQLState());
sqle.printStackTrace();
}
while ( (sqle = sqle.getNextException()) != null);
}
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}

Re:Re:Re:Re:Re:Re:Re:Re:Locking the foxpro dbf in Sco Unix
shervon
2006-08-16 23:19:29.0
int flag=System.in.read();
if(flag=='Y' || flag=='y' || flag=='C' || flag=='c'){
break;
}


what do u mean by the above code you accept ab integer and checks whether it is a character
Locking the foxpro dbf in Sco Unix
shervon
2006-08-16 23:57:21.0
Anyway it gives an error when trying to access rs,next after entering "y" in the first occassion.IOException
Locking the foxpro dbf in Sco Unix
shervon
2006-08-17 00:07:17.0
Anyway it gives an error when trying to access rs,next after entering "y" in the first occassion.IOException

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap