Dear All,
I've found the problem with open file from network drive with shared mode. How can I open it.
CURDIR() function is show
"Network\V4 on DUTCHEZ4"
I try to use this command but it doesn't work.
USE (CURDIR()+"\TEST") SHARED NEW
If I do not use SHARED, I can open it but not in shared mode
USE (CURDIR()+"\TEST") NEW
Best regards,
Dutch
Use file from Network Drive with Shared
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dutch,
> You mean I have to USE an EXCLUSIVE mode.
Yes. If Windows Mobile 2005 does not let you use the SHARED mode then you have no other choice.
> May I have an example open file as SEMAPHORE?
Very simple, you use an ascii file where you write the locked records info. i.e.: locks.txt where you have:
number of locks: 2
record 2300
record 3420
So before you are going to modify a record, you check locks.txt to see if your record is "locked". If not, then you increase the number of locked records and write the record number. When you are done, you modify locks.txt again to remove the locked record.
> You mean I have to USE an EXCLUSIVE mode.
Yes. If Windows Mobile 2005 does not let you use the SHARED mode then you have no other choice.
> May I have an example open file as SEMAPHORE?
Very simple, you use an ascii file where you write the locked records info. i.e.: locks.txt where you have:
number of locks: 2
record 2300
record 3420
So before you are going to modify a record, you check locks.txt to see if your record is "locked". If not, then you increase the number of locked records and write the record number. When you are done, you modify locks.txt again to remove the locked record.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dutch,
Another possible workaround is to simulate a kind of client/server schema. You may have a file named tolock.txt and there you write the record you want to lock, and an app in the pc locks it for you.
In other words, you give instructions to a server application that modify the database for you. You may also use sockets instead an ascii file to comunicate with the "server".
Another possible workaround is to simulate a kind of client/server schema. You may have a file named tolock.txt and there you write the record you want to lock, and an app in the pc locks it for you.
In other words, you give instructions to a server application that modify the database for you. You may also use sockets instead an ascii file to comunicate with the "server".
I do not understand
Dear Antonio,
I don't understand "Lock.Txt". If this file is a main transaction file, you cannot use in exclusive for sure. If not how can you request for a lock record because you don't know what is the record number to lock. I you say WM5 cannot open with SHARE, I think the middle application (interface module) is the way out.
Best regards,
Dutch
I don't understand "Lock.Txt". If this file is a main transaction file, you cannot use in exclusive for sure. If not how can you request for a lock record because you don't know what is the record number to lock. I you say WM5 cannot open with SHARE, I think the middle application (interface module) is the way out.
Best regards,
Dutch
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Dutch,
> because you don't know what is the record number to lock.
RecNo()
> I you say WM5 cannot open with SHARE
According to Microsoft, Windows Mobile 2005 supports files sharing API functions, but as you report, you are experiencing troubles with it.
> I think the middle application (interface module) is the way out.
What is it the interface module ? Do you mean the client/server model I commented ?
> because you don't know what is the record number to lock.
RecNo()
> I you say WM5 cannot open with SHARE
According to Microsoft, Windows Mobile 2005 supports files sharing API functions, but as you report, you are experiencing troubles with it.
> I think the middle application (interface module) is the way out.
What is it the interface module ? Do you mean the client/server model I commented ?
Dear Antonio,
No, Because I still use FW and Comix. I've plan to change database but not now.
> Recno() is means you have to open the database first but I cannot open with exclusive because everybody use the main transaction file.
The interface module means small program to communicate between PPC and Database on server. PPC will write a single database to request the information and Interface will read database on the server and return the information that PPC need. Another request is post transaction from PPC and Interface will post instead of PPC to database on server.
Best regards,
Dutch
No, Because I still use FW and Comix. I've plan to change database but not now.
> Recno() is means you have to open the database first but I cannot open with exclusive because everybody use the main transaction file.
The interface module means small program to communicate between PPC and Database on server. PPC will write a single database to request the information and Interface will read database on the server and return the information that PPC need. Another request is post transaction from PPC and Interface will post instead of PPC to database on server.
Best regards,
Dutch