Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSQuery
Message
From
01/07/2003 11:07:32
 
 
To
01/07/2003 05:48:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00805557
Message ID:
00805712
Views:
26
Thank you very much for your quick response. I’ll try to do a better job of explaining my current situation.

I started with a VFP 6.0 database on one computer being merged to several different Word 97 documents either through MSQuery or Excel through MSQuery (if there were a lot of fields being merged). I found it to be very slow merging through Excel and then into Word in order to accommodate the restriction of the 255 SQL character limitation using MSQuery. However, I was able to deal with that as I was the only one using the computer.

Now, I have a VFP 6.0 database that is shared over two computers in a client/server network (really a peer to peer network, but the database is only on the host computer which I was working on). I was unable to figure out how to merge a document over the network (ie the client has the Word document, and the Server has the VFP database). I contacted Microsoft, and they talked me through one solution. They said I could have the same copy of the database on both computers. When, in a form, someone clicks the save button in order to add values to a table, the save button updates both the table on the server, and the table on the client. The client copy of the database and the server copy of the database will therefore always be identical, and the merged documents will merge to the database on the local computer. As you can imagine, making changes and saving to two computers can become slow, but at the time, it did accomplish my objective.

Now, the speed is starting to become an issue. In order to do a workaround, I created a program that selects the data to be merged into a free table. Foxpro is able to merge into a free table without needing MSQuery, and there are no limits (as far as I know) on the number of characters in the SQL statement. In order to have the free table updated whenever changes are made to the original database, I run the program every time a change is made to the dababase information (I issue a “do program” statement in the “save” button of a form). Therefore, the free table is always up to date. The only problem with this solution is that once one person (say the client) updates the free table, the other person (the server) cannot update the free table since utilizing the “select into table” command causes the other computer to get a “file in use” error.

I am not sure if this is clear, but I am not a “great” programmer. As of three years ago, I did not even know what a database is! However, I have learned a lot and enjoy learning and fixing problems with my programs. This is a problem that I have had for over a year and have not been able to solve. Unfortunately, I am not sure what you are referring to with your "Sys" command to change the name of the free table. I am not sure if it applies based on my current situation which I hope I clarified a bit better above. The 255 character limit is the SQL limit, and I have never been able to figure out how to utilize the SQL and SQL1 statements (ie how to combine them into one statement - do you use the first SQL statement to select into a cursor and then use the SQL1 statement to select * from the cursor along with additional fields from the database?)

I would really appreciate either a solution to the “file in use” problem (ie being able to run the “select into table” program on different computers concurrently without getting this error), or an alternative to MSQuery. Thank you very much for your help.

Paul
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform