Article ID: 115976
Article Last Modified on 11/18/2003
113951 How to Obtain & Distribute the Compatibility Layer
'write ISAM entries in INI file just in caseImmediately following this comment, you'll find a series of lines of the following form:
x = OSWritePrivateProfileString("Installable ISAMs", ...
The third argument in each of these calls is a file name. Modify the
name so that it contains the number 200 instead of 110. For example,
change XBS110.DLL into XBS200.DLL. Also, add an extra line to support
Paradox 4.X. The resulting code should look like the following except
that each pair of lines will appear as one, single line in Visual Basic:
x = OSWritePrivateProfileString("Installable ISAMS", "Paradox 3.X",
"PDX200.DLL", "VISDATA.INI")
x = OSWritePrivateProfileString("Installable ISAMS", "Paradox 4.X",
"PDX200.DLL", "VISDATA.INI")
x = OSWritePrivateProfileString("Installable ISAMS", "dBASE III",
"XBS200.DLL", "VISDATA.INI")
x = OSWritePrivateProfileString("Installable ISAMS", "dBASE IV",
"XBS200.DLL", "VISDATA.INI")
x = OSWritePrivateProfileString("Installable ISAMS", "FoxPro 2.0",
"XBS200.DLL", "VISDATA.INI")
x = OSWritePrivateProfileString("Installable ISAMS", "FoxPro 2.5",
"XBS200.DLL", "VISDATA.INI")
x = OSWritePrivateProfileString("Installable ISAMS", "Btrieve",
"BTRV200.DLL", "VISDATA.INI")
Add the following entries to support Paradox on a network:
x = OSWritePrivateProfileString("Paradox ISAM", "ParadoxUserName",
"Bill", "VISDATA.INI")
' NOTE: Bill is the machine name (any name you want to give it)
x = OSWritePrivateProfileString("Paradox ISAM", "ParadoxNetPath",
"c:\vb\prdx", "VISDATA.INI")
x = OSWritePrivateProfileString("Paradox ISAM", "ParadoxNetStyle",
"4.x", "VISDATA.INI") '** note: 4.x works with 3.x and 4.x NetStyles
x = OSWritePrivateProfileString("Paradox ISAM", "CollatingSequence",
"Ascii", "VISDATA.INI")
Further down in the code (about half way through the Sub procedure),
you will see this line:
If PrefOpenOnStartup.Checked = True ThenAdd an extra If statement to support the shortcut key for Paradox 4.x to make the code look like this:
If PrefOpenOnStartup.Checked = True Then
If gstDataType = "MS Access" Then
SendKeys "%FOM"
ElseIf gstDataType = "dBASE III" Then
SendKeys "%FOD"
ElseIf gstDataType = "dBASE IV" Then
SendKeys "%FOA"
ElseIf gstDataType = "FoxPro 2.0" Then
SendKeys "%FOF"
ElseIf gstDataType = "FoxPro 2.5" Then
SendKeys "%FOX"
ElseIf gstDataType = "Paradox 3.X" Then
SendKeys "%FOP"
ElseIf gstDataType = "Paradox 4.X" Then '** new addition
SendKeys "%FOR" '** 'r' in the word Paradox is shortcut
ElseIf gstDataType = "Btrieve" Then
SendKeys "%FOB"
ElseIf gstDataType = "ODBC" Then
SendKeys "%BOB"
End If
End If
Select Case gstDataType
Case "MS Access"
CMD1.Filter = "Access DBs (*.mdb)|*.mdb|All Files (*.*)|*.*"
CMD1.DialogTitle = "Open MS Access Database"
Case "dBASE III"
CMD1.Filter = "dBASE III DBs (*.dbf)|*.dbf"
CMD1.DialogTitle = "Open dBASE III Database"
Case "dBASE IV"
CMD1.Filter = "dBASE IV DBs (*.dbf)|*.dbf"
CMD1.DialogTitle = "Open dBASE IV Database"
Case "FoxPro 2.0"
CMD1.Filter = "FoxPro DBs (*.dbf)|*.dbf"
CMD1.DialogTitle = "Open FoxPro 2.0 Database"
Case "FoxPro 2.5"
CMD1.Filter = "FoxPro DBs (*.dbf)|*.dbf"
CMD1.DialogTitle = "Open FoxPro 2.5 Database"
Case "Paradox 3.X"
CMD1.Filter = "Paradox DBs (*.db)|*.db"
CMD1.DialogTitle = "Open Paradox 3.X Database"
Case "Paradox 4.X" '** newly added for Paradox 4.x
CMD1.Filter = "Paradox DBs (*.db)|*.db"
CMD1.DialogTitle = "Open Paradox 4.X Database"
Case "Btrieve"
CMD1.Filter = "Btrieve DBs (FILE.DDF)|FILE.DDF"
CMD1.DialogTitle = "Open Btrieve Database"
End Select
Further down in the code there is another Select Case statement. Make
it look like this:
Select Case gstDataType
Case "dBASE III"
Connect = "dBASE III"
DataBaseName = StripFileName(gstDBName)
Case "dBASE IV"
Connect = "dBASE IV"
DataBaseName = StripFileName(gstDBName)
Case "FoxPro 2.0"
Connect = "FoxPro 2.0"
DataBaseName = StripFileName(gstDBName)
Case "FoxPro 2.5"
Connect = "FoxPro 2.5"
DataBaseName = StripFileName(gstDBName)
Case "Paradox 3.X"
Connect = "Paradox 3.X"
DataBaseName = StripFileName(gstDBName)
Case "Paradox 4.X" '** newly added
Connect = "Paradox 4.X"
DataBaseName = StripFileName(gstDBName)
Case "Btrieve"
Connect = "Btrieve;"
DataBaseName = gstDBName
Case Else
Connect = ""
DataBaseName = gstDBName
End Select
Sub Open_paradox4X_Click ()
gstDataType = "Paradox 4.X"
OpenLocalDB False
End Sub
Sub New_paradox4X_Click ()
gstDataType = "Paradox 4.X"
NewLocalISAM
End Sub
Additional query words: 3.00
Keywords: KB115976