CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Posts
    8

    Database suggestion required

    I would like to distibute an app which obtains data from a database. I would like some suggestions on what (non-commercial) properietery relational database system I could use. I don't want my clients to be able to open up the db, and it must be easy to access through VB. I am currently using and Access db, but this enables my clients to get into the db and mess up the data.
    Your suggestion would be greatly appreciated.
    Thank You


  2. #2
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: Database suggestion required

    Why not just password protect your access database.


  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Database suggestion required

    You can encrypt db to make it unreadable via Access itself

    If you view an Access Database in notepad you will see "Standard Jet DB" in the header.
    Changing this information will cause the database to become unreadable via Access.

    'do not change it manually in word editor- db will be corrupted ( do it only through this proc)


    Private Sub cmdLock_Click()
    '========================
    Call Lock_Database("c:\testdb\a.mdb", 1)
    MsgBox "Locked"
    End Sub

    Private Sub cmdUnlock_Click()
    '========================
    Call Lock_Database("c:\testdb\a.mdb", 2)
    MsgBox "Unlocked"

    End Sub

    Private Sub Lock_Database(sPath As String, iAction As Integer)
    '========================
    Dim iFreeFile As Integer
    Dim lLoop As Long
    Dim lLoc As Long
    Dim sString As String

    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



    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured