Click to See Complete Forum and Search --> : clookup.getclient
Daveymcman
Oct 29th, 2004, 09:29 PM
I have a system using pervasive 7. It runs an application called Lawbase. and a complex MS Word 97 macro which look this database up and retrieves data into a letter to save the user time. It has been working prefectly on an NT 4.5 SBS server with NT 4 workstations.
We have upgraded the srever to SBS 2k3 and the workstatoins to Terminnal services with a dedicated 2k3 server. We have not upgraded Pervasive. The main application, Lawbase, works perfectly. Cleints on the Term Serv box love their new speed. But the MS Word 97 Macro no longer works.
It fails at the clookup line of the code
Public Sub GetClientDetails()
On Error GoTo GetLawbaseError
datapath = System.PrivateProfileString("LAWBase.ini", "Defaults", "DataDirectory")
clookup.GetClient "", -1, ScopeClientProjectRequired, False
clookup.Getclient no longer works. Since it is still running MS Word97 and the same pervasive the problem must be MS Server 2k3. Can anybody point me in the right direction to solve this problem
Thank you
dogwomble
Oct 29th, 2004, 09:43 PM
While it may look to be a problem with 2k3, it is not necessarily the case.
My first thought is that maybe the system was not reinstalled afresh, just directly transferred onto the new system, and somehow the program is set to look in locations that no longer exist - ie. maybe it now looks like it's installed on Drive G: for example, but it's looking for stuff on Drive F:.
Otherwise, can I only suggest that you post the specific error you are receiving as I'm only basing the above assumption on the previous line of code. Without actually seeing the error message you are receiving, you're probably not gonna get much help because the error message usually goes a very long way in describing exactly what went wrong. :)
Daveymcman
Oct 30th, 2004, 03:28 AM
The pervasive was installed fresh on the 2k3 for the lawbase application which runs perfectly. The macro's were simply copied over. When you enter lawbase and type your username the pervasive client loads and you see the pervasive splash screen for a second.
All the drive mappings remain the same. But it is not that easy.
On a going system ( ie NT client) within Word, with the macro running, there is a button called "get client" this executes the lines of code I enclosed down to the clookup line. When debugging on a going system, the last line, clookup.getclient etc, invokes pervasive and you see the pervasive client applet loading (or at least the splash screen for a second or two). Pervasive client loads as a direct result of the clookup line. And on a going system retruns a list of all clients in the pervasive database. Once you select a client from the list and click OK, the next line of VB code after clookup.getclient etc executes populating various variables with the specific client data. eg name, address etc.
On 2k3 absolutely nothing happens. The subrouting exits immediately (probably the false returns true) without executing the several lines of following code which populate the data. No Pervasive client is invoked (or at least I do not see the splash screen I see every other time on NT) and no list of possible clients is displayed.
So the clookup.getclient etc on a going system is the single line of code which forces pervasive to retrieve data. On 2k3 it is simply ignored. (appears to return false and exits)
Just like this single line of code
addressinfo = Application.GetAddress(myname, AddressLayout, , 1, 0, True)
invokes an outlook contact lookup. (which is also a button in the same macro code and works perfectly in NT and 2k3!). Yes the addresslayout is complex and variables have to be set. But application.getaddress is the single element that invokes the lookup.
So my problem is clookup.getclient doesn't trigger pervasive.
What is the correct syntax for this command to invoke pervasive in 2k3
Someone a lot smarter than me must know
Thank you
Daveymcman
Nov 1st, 2004, 01:03 AM
Found the answer, a dll with the lawbase app which was self registering did not register lbn353.dll.
Got to love those self registering dll's
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.