I've already done it in VB6 which was perfectly working fine but i've to work it in c#
for locking access database
for unlock access database
How to do it in c#
for locking access database
Sub lockDb(bPath AsString)
OnErrorGoTo Ermsg
Dim iFreeFile AsIntegerDim lLoop AsIntegerDim sString AsString
iFreeFile = FreeFile() 'Get free file #
Open bPath For Binary As #iFreeFile 'Open specified file for binary I/O.
sString = "DVUnion Windows Database"'Default header data.
For lLoop = 7To19'loop through and update byte positions 9 through 15.
Put #iFreeFile, lLoop, VBA.Mid$(sString, lLoop - 4, 1)
Next lLoop
' If cmdunlock.Enabled = False Then cmdunlock.Enabled = True
'' cmdlock.Enabled = False
Close #iFreeFile
for unlock access database
Sub UnlockDb(bPath AsString)
OnErrorGoTo Ermsg
Dim iFreeFile AsIntegerDim lLoop AsIntegerDim sString AsString
iFreeFile = FreeFile() 'Get free file #
Open bPath For Binary As #iFreeFile 'Open specified file for binary I/O.
sString = "Standard Jet DB"'Default header data.
For lLoop = 7To19'loop through and update byte positions 9 through 15.
Put #iFreeFile, lLoop, VBA.Mid$(sString, lLoop - 4, 1)
Next lLoop
Close #iFreeFile
How to do it in c#
www.facebook.com/raazak47