dbTalk Databases Forums  

Problem with Btrieve API in a VBA-Script

comp.databases.btrieve comp.databases.btrieve


Discuss Problem with Btrieve API in a VBA-Script in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Karl Friedrich
 
Posts: n/a

Default Problem with Btrieve API in a VBA-Script - 12-22-2003 , 07:58 AM






Hello,

I have a VBA-Script in Word to search for customer addresses in a
btrieve file. If I access my btrieve file I get an error (under
certain circumstances, described below) but if I export the data into
a text file and access this file all works well, so I think it's a
problem with the btrieve API and not with word or VBA.

The user enters some information (something like zip-code) into a user
form and gets all customers from that region displayed in a listbox.
He can then select an address to be taken over into the document (in
this case the form is closed), leave the form without an address or
start another search.

If I do repeated searches (at least about 5 times) without closing the
form and finally leave the form without transfering data to the
document I get the error:

-- Original Text in German --
WINWORD.EXE - Fehler in Anwendung
Die Anweisung in "0x650e6096" verweist auf Speicher in "0x20323171".
Der Vorgang "read" konnte nicht auf dem Speicher durchgeführt werden.

-- my attempt of a translation
WINWORD.EXE - Error in Application
The command in "0x650e6096" refers to memory "0x20323171". The process
"read" could not be carried out.
(sorry if my translation is a little bit odd)

(The numbers may vary)

My routine is based on the code snippets BTRVBUPD and BTRVVB6 from
the Pervasive Developer Center, but at the moment I'm not very
familiar with VBA.

I use the functions OPEN, GET GREATER OR EQUAL (to start with the
given zip-code), GET NEXT (until no more records match my criteria),
CLOSE, RESET and STOP for each search.

I accessed the libraries wbtrv32 and w3btrv7 with the same result.

OS is WinNT and Win2000, P.SQL7 SP5 an a NetWare server

Has anyone an idea what went wrong?

TIA and merry christmas
Karl

--

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.