DBAS IV Shared Database problem 
Author Message
 DBAS IV Shared Database problem

Can anyone out there please help me?
I have started what seemd to be a simple Database application which has
turned into a major hassle.

What I am trying to do is this:-
I have two VB 4.0 applications A, and B.
Application A receives messages from a communications port and writes these
to a dBase IV table named MsgRequests.
Application B, which is polling the MsgRequests table at 1 second intervals
(response times are not an issue here) reads the messages sequentially from
the table, at the same time deleting them from the table.
Application B then processes the messages which it has read and writes the
responses to another dBASE IV table named MsgResponses.
Application A, which is polling the MsgResponses table at 1 second
intervals reads the response messages sequentially, deletes them from the
table and sends them off over the network via the comms port. And so on.
Nice and easy in principle.

What actually happens is this:-
I start application A which writes maybe two or three messages into the
MsgRequests table. When I start application B, it sees the two or three
messages in the MsgRequests table and successfully reads and deletes them
from the table. It then processes the request mesages and writes the
responses into the MsgResponses file. After that, nothing more happens.
Application A, which is polling the MsgResponse table does not see the new
messages at all. It is as if both applications are maintaining different
copies of the tables.

Both applications (A and B) are written in VB 4.0 under a Windows NT 4.0
platform. Currently the applications reside in the same PC for testing
purposes but will ultimately be separated over a network.

Because the tables are dBASE IV they are opened directly as external tables
(dynasets) in the VB applications. They have no indeces as this is not
possible with dynasets. It is not important anyway, as the tables are read
sequentially. The databases are definitely opened as shared with read/write
access. The open statements I have used are as follows.

Dim MsgReqDataBase As Database
Dim MsgRespDataBase As Database
Dim MsgReqTable As Recordset
Dim MsgRespTable As Recordset

' Open the request/response message tables

Set MsgReqDataBase =
DBEngine.Workspaces(0).OpenDatabase("c:\HealthNetSwitch\Data", False,
False, "dBase IV")
Set MsgReqTable = MsgReqDataBase.OpenRecordset("MsgRequests")
Set MsgRespDataBase =
DBEngine.Workspaces(0).OpenDatabase("c:\HealthNetSwitch\Data", True, False,
"dBase IV")
Set MsgRespTable = MsgRespDataBase.OpenRecordset("MsgResponses")

I get the impression that I made need a 'refresh' type mechanism but it
doesn't work with external tables.

As you can see, I am not a database expert. The difficult part was getting
the X25 comms interface going but I have spent much longer trying to get
the database to work.

I would be eternally grateful to anyone who can help me out.


Many thanks in anticipation.



Wed, 03 May 2000 03:00:00 GMT  
 DBAS IV Shared Database problem



Quote:
> Can anyone out there please help me?
> I have started what seemd to be a simple Database application which has
> turned into a major hassle.

<snip>>

Quote:
> DBEngine.Workspaces(0).OpenDatabase("c:\HealthNetSwitch\Data", True,

False,
IS THIS A TYPE-OH-OH >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>^^^^^^

Quote:
> "dBase IV")

<snip>

Don



Wed, 03 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to read Dbas IV with VB5 or 6

2. Problems accesing a DBASE IV database !!

3. Access database sharing problem

4. dBASE IV table into Access Database table?

5. How do I use VB3.0 SE and a Dbase IV database

6. Packing a DBASE IV Database in VB3Pro

7. DBASE IV Encrypted Database (.dbf)

8. importing Dbase IV Database

9. dBASE IV table into Access Database table?

10. VB5 & dBASE IV databases

11. Export to dBase IV problem

12. Problem with linked Codebasic DBASE IV Tables

 

 
Powered by phpBB® Forum Software