VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Keep competitors and clients out of your databases with VB front ends. If you view an Access Databa

by Sean Patrick (Software Engineering and Networking (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 28th December 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Keep competitors and clients out of your databases with VB front ends. If you view an Access Database in notepad you will see "Standard Jet

API Declarations




'*******************************************************************'
'Module Name: modProtectAccess
'
'Purpose:Changes the header of an access database to keep competitors
' and clients out of your databases with VB front ends.
'
'Author: Sean - Software Engineering and Networking ([email protected])
'*******************************************************************'

Public Enum LockDatabase
LockData = 1
UnlockData = 2
End Enum


Rate Keep competitors and clients out of your databases with VB front ends. If you view an Access Databa




'*************************************************'
'Purpose: Changes the header of an access database.
'*************************************************'

Dim iFreeFile   As Integer
Dim iLoop       As Long
Dim lLoc        As Long

    iFreeFile = FreeFile() 'Get free file #
    
    Open sPath For Binary As #iFreeFile 'Open specified file for binary I/O.

    lLoc = 1 'Set starting byte location
    
    Select Case iAction 'Set the header string for the appropriate action.
        Case 1
             sString = "MYDB Database!!" 'Modified header data.
        Case 2
             sString = "Standard Jet DB" 'Default header data.
    End Select
    
    For lLoop = 5 To 19 'loop through and update byte positions 9 through 15.
        Put #iFreeFile, lLoop, Mid$(sString, lLoop - 4, 1)
    Next lLoop

Close #iFreeFile
    

End Sub



Download this snippet    Add to My Saved Code

Keep competitors and clients out of your databases with VB front ends. If you view an Access Databa Comments

No comments have been posted about Keep competitors and clients out of your databases with VB front ends. If you view an Access Databa. Why not be the first to post a comment about Keep competitors and clients out of your databases with VB front ends. If you view an Access Databa.

Post your comment

Subject:
Message:
0/1000 characters