Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Btrieve using VB6 2

Status
Not open for further replies.

jbrowne

Programmer
Feb 1, 2000
182
IE
Hi,
I'm converting a project from VB3 to VB6. In the VB3 version, I am accessing a Btrieve database using the ISAM driver included in VB3 through the jet engine using dao. VB6 no longer provides an ISAM driver (no 32 bit equivilent) so we have to try to access thru ODBC. The problem with this is that because we are no longer using the jet workspace - dao does not support the "seek" method which is used extensively throughout the project. I have been given advise to convert to ado but I am not very familiar with ado.
Would the conversion mean extensive code changes or does anyone know if there is a better solution ??

Thanks in advance
John B
 
I tried on a WinXP box with Pervasive.SQL V8. I also tried on a Windows 2000 box running Pervasive.SQL 2000i SP4.
I'm not sure I understand the question you have about the version of Btrieve supported by Pervasive 2000i sp3. The Btrieve version returned when using 2000i SP3 is 7.90.

What error are you getting? That might tell us a little more about your problem.
info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
For your information....
I've an old database that it's structure is Btrieve but I'm not sure what is version for this btrieve database. I think it must less than 6.15. So, I need to connect to this database by VB6 in order to create the custom report and covert it to other database. Since I download the pervasive 2000i sp3 for developer and other tool from When I use VB6 to connect my database I have problem as above. But when I try on the demo database I can connect it!!!.
Now I'm trying to solve my problem and I need your help very much too.
For the table file is *.dat fie neither *.Btr and *.Mkd file. Thie info from my notification.
Thank you very much.
 
I use Btrieve and ADO.
Btrieve is very fast, for insert/Update and lock, Ado is good for query and report.

A Btrieve File Open :

Type STD_e_INVENTARIO
CodInv As String * 3 NumCart As String * 8 CodArt As String * 6
Qta as string * 8 (Double)
......
End Type


'** Open File

Dim e_INVENTARIO As STD_e_INVENTARIO
dim pe_Inventario as String
pe_Inventario = Space$(128): iKey% = 0
sNomeFile$ = "c:\data\e_Inventario.KEY"
iStatus% = BTRCALL(BOPEN, pe_Inventario, e_INVENTARIO, Len(e_INVENTARIO), ByVal sNomeFile$, KEY_BUF_LEN, iKey%)
If iStatus% <> 0 Then Call Sql_Err(iStatus%)

I use CVD amd MKD (My function) to read and write double and currency value


Function Cvd(X As String) As Double
'---------------------------------------------------------
' Function per la formattazione dei valori CVD
' negli archivi vecchi
'---------------------------------------------------------

If Len(X) <> 8 Then
MsgBox &quot;Lunghezza Variabile in CVD <> 8&quot;
Else
CopyMemory Cvd, ByVal X, 8
End If

End Function


Function Mkd(X As Double) As String
'---------------------------------------------------------
' Function per la formattazione dei valori MKD
' negli archivi vecchi
'---------------------------------------------------------

Mkd = Space$(8)
CopyMemory ByVal Mkd, X, 8

End Function



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top