0

I've recently bought a new tower and used third-party software to port across all my development tools (another story in itself), including VB 6.0, all my third-party tools, and Btrieve. The only problem I have with Btrieve is more an annoyance than anything. On this new tower, I have to remember to run my compiled application once before attempting to run it from inside the IDE or else it will not load, and subsequently return a corresponding error when it attempts to open the first file.

If anyone else has encountered this and knows how to fix it, I'd much appreciate it.

Bill Hileman
  • 2,798
  • 2
  • 17
  • 24
  • Define "will not load" and maybe tell us what error number and description you see. – Bob77 May 08 '17 at 20:39
  • Btrieve is a database server program. It's just stopped being launched when I run my application from within the IDE. The error message would be meaningless to you or others, since it is my own error message. Suffice it to say that it cannot open a Btrieve file because the Btrieve server has not been started/loaded. I'm only wondering why it suddenly stopped auto-loading on my new computer after the transfer. It's not something my application needs to initiate explicitly. – Bill Hileman May 08 '17 at 20:51
  • I should add that when I encounter this (for now) all I need to do is start my compiled app, and close it. Then it works in the IDE for the rest of the time. – Bill Hileman May 08 '17 at 20:52
  • Smells like a UAC Virtualization issue but we still don't know what exception occurs, so it is hard to be of any help. – Bob77 May 09 '17 at 04:55
  • @BillHileman: Is Btrieve installed as a service? Autostart? It has been a long time since I used it so I cannot remember. – nabuchodonossor May 09 '17 at 06:55
  • @Bob77 It's not an exception at all. I understand the confusion. When I attempt to open a file in Btrieve, a call to the server returns a status 22 (I think) whichever one specifically means "Btrieve not loaded." It's not that I'm not familiar with this error, I just wonder why it only happens on this new machine, and only when run (first time) from within the IDE. – Bill Hileman May 09 '17 at 13:01
  • @nabuchodonossor It is a service, I'm sure. I believe the program itself (from memory) is wbtrv32.exe. I'm using the older Smithware ActiveX controls to access the data files. Smithware was later absorbed by Pervasive. Most developer use their SQL versions, but there are legacy apps like mine that continue to require the older one. – Bill Hileman May 09 '17 at 13:05
  • @BillHileman: What about the following workaround: You create a very small program to just open the btrieve file, and exits immediatly. And this program you can put in autostart - that should do your "manual" task. At least untll you found your reason. BTW, I use VsamEx ... also very old style *g* – nabuchodonossor May 10 '17 at 07:02

1 Answers1

0

After checking this page on Wikipedia I realized that I needed to focus on two files: w32mkde.exe and wbtrv32.dll

By manually running the exe file, it would load the engine and my application would then run in the IDE, but I still had to manually start the exe. The desired and original behavior on my older machine was that running my program in the IDE would automatically launch the sever exe. From the Wiki page, I learned that it was wbtrv32.dll that was actually called by the program, which in turn would call the exe if needed.

I had recentl ported over my old machine to a new tower, and many of the ocx and dll files in \windows\syswow64 did not make it. There seems to be no pattern to which ones, but I had to re-register those as I found them. There must be some link there, because when I copied-over the W*.exe and W*.dll files from my production backup folder to the syswow64 folder, it suddenly worked again. Likely just a corrupt copy of the dll file. I believe the reason that the compiled version ran correctly is because those dll and exe files were installed to the application folder, and were apparently okay, but not being invoked when run from the IDE.

Hope this might help someone else some day.

Bill Hileman
  • 2,798
  • 2
  • 17
  • 24