Welcome to dbFreaks.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Backup and restore feature on VB6 application

 
   Database Help (Home) -> Visual Basic RSS
Related Topics:
VB6-Access2003 Compact Repair Archive/Backup - I've created a VB front end to Access 2003 database works great, but I want to add database routines to the Now to do the routines directly from Access seems simple enough, built in..

sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table and there a column wich is data type All data in this column is in form So why when i run .asp page with simple query to..

arrays - is there a way to the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to I have a table that contains for work Contained in the table are these are groupings of machining
Next:  Filling comboxbox without using additem  
Author Message
Venkat

External


Since: Apr 12, 2004
Posts: 5



(Msg. 1) Posted: Tue Jun 08, 2004 5:16 pm
Post subject: Backup and restore feature on VB6 application
Archived from groups: microsoft>public>vb>database (more info?)

Hi,

I've an application developed in VB 6.0 and DB is MS-Access 2000.
Now I would like to provide backup and restore feature in the application.
That is to say that to create a backup file of the database which can be
saved.
For some reasons, I do not want to give an MS-Access DB as a backup file.

Could anybody please tell me what type of file should I give a backup file.
Please note that the backup file should not be readable/accessible by any
other application.

Kindly help. Thanks in advance.

Venkat

 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
Jezebel2

External


Since: Apr 20, 2004
Posts: 21



(Msg. 2) Posted: Tue Jun 08, 2004 10:40 pm
Post subject: Re: Backup and restore feature on VB6 application [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The signature (initial bytes) of an MDB file is:

00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 64 74 20 44 42

When you write the back-up, change the initial bytes to something else. When
you restore, change them back. Not very secure, but sufficient for simple
purposes.






"Venkat" <vreddyg.RemoveThis@hotmail.com> wrote in message
news:%23MRQIbTTEHA.2972@TK2MSFTNGP12.phx.gbl...
 > Hi,
 >
 > I've an application developed in VB 6.0 and DB is MS-Access 2000.
 > Now I would like to provide backup and restore feature in the application.
 > That is to say that to create a backup file of the database which can be
 > saved.
 > For some reasons, I do not want to give an MS-Access DB as a backup file.
 >
 > Could anybody please tell me what type of file should I give a backup
file.
 > Please note that the backup file should not be readable/accessible by any
 > other application.
 >
 > Kindly help. Thanks in advance.
 >
 > Venkat
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
Venkat

External


Since: Apr 12, 2004
Posts: 5



(Msg. 3) Posted: Tue Jun 08, 2004 10:40 pm
Post subject: Re: Backup and restore feature on VB6 application [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for the reply.

I do not have any idea how to manipulate with the signature of a file.
Could you please redirect me to any resource where I can get the
information.


Thanks.
Venkat



"Jezebel" <dwarves.TakeThisOut@heaven.com.kr> wrote in message
news:eV33XyTTEHA.3844@TK2MSFTNGP11.phx.gbl...
 > The signature (initial bytes) of an MDB file is:
 >
 > 00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 64 74 20 44 42
 >
 > When you write the back-up, change the initial bytes to something else.
When
 > you restore, change them back. Not very secure, but sufficient for simple
 > purposes.
 >
 >
 >
 >
 >
 >
 > "Venkat" <vreddyg.TakeThisOut@hotmail.com> wrote in message
 > news:%23MRQIbTTEHA.2972@TK2MSFTNGP12.phx.gbl...
  > > Hi,
  > >
  > > I've an application developed in VB 6.0 and DB is MS-Access 2000.
  > > Now I would like to provide backup and restore feature in the
application.
  > > That is to say that to create a backup file of the database which can be
  > > saved.
  > > For some reasons, I do not want to give an MS-Access DB as a backup
file.
  > >
  > > Could anybody please tell me what type of file should I give a backup
 > file.
  > > Please note that the backup file should not be readable/accessible by
any
  > > other application.
  > >
  > > Kindly help. Thanks in advance.
  > >
  > > Venkat
  > >
  > >
  > >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
Jezebel2

External


Since: Apr 20, 2004
Posts: 21



(Msg. 4) Posted: Wed Jun 09, 2004 1:06 am
Post subject: Re: Backup and restore feature on VB6 application [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The signature is just the first few bytes of the files.
Open/Read/Write/Close. VB's Help covers this pretty well.


"Venkat" <vreddyg.RemoveThis@hotmail.com> wrote in message
news:%234QivYUTEHA.3616@TK2MSFTNGP11.phx.gbl...
 > Thanks for the reply.
 >
 > I do not have any idea how to manipulate with the signature of a file.
 > Could you please redirect me to any resource where I can get the
 > information.
 >
 >
 > Thanks.
 > Venkat
 >
 >
 >
 > "Jezebel" <dwarves.RemoveThis@heaven.com.kr> wrote in message
 > news:eV33XyTTEHA.3844@TK2MSFTNGP11.phx.gbl...
  > > The signature (initial bytes) of an MDB file is:
  > >
  > > 00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 64 74 20 44 42
  > >
  > > When you write the back-up, change the initial bytes to something else.
 > When
  > > you restore, change them back. Not very secure, but sufficient for
simple
  > > purposes.
  > >
  > >
  > >
  > >
  > >
  > >
  > > "Venkat" <vreddyg.RemoveThis@hotmail.com> wrote in message
  > > news:%23MRQIbTTEHA.2972@TK2MSFTNGP12.phx.gbl...
   > > > Hi,
   > > >
   > > > I've an application developed in VB 6.0 and DB is MS-Access 2000.
   > > > Now I would like to provide backup and restore feature in the
 > application.
   > > > That is to say that to create a backup file of the database which can
be
   > > > saved.
   > > > For some reasons, I do not want to give an MS-Access DB as a backup
 > file.
   > > >
   > > > Could anybody please tell me what type of file should I give a backup
  > > file.
   > > > Please note that the backup file should not be readable/accessible by
 > any
   > > > other application.
   > > >
   > > > Kindly help. Thanks in advance.
   > > >
   > > > Venkat
   > > >
   > > >
   > > >
  > >
  > >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
Venkat

External


Since: Apr 12, 2004
Posts: 5



(Msg. 5) Posted: Tue Jun 15, 2004 4:09 pm
Post subject: Re: Backup and restore feature on VB6 application [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

I've explored MSDN thoroughly, unfortunately, I could not find any useful
information.
Please help me by providing some other resources.
Please.

Thank you.
Venkat


"Jezebel" <dwarves RemoveThis @heaven.com.kr> wrote in message
news:#mZP7DVTEHA.564@TK2MSFTNGP11.phx.gbl...
> The signature is just the first few bytes of the files.
> Open/Read/Write/Close. VB's Help covers this pretty well.
>
>
> "Venkat" <vreddyg RemoveThis @hotmail.com> wrote in message
> news:%234QivYUTEHA.3616@TK2MSFTNGP11.phx.gbl...
> > Thanks for the reply.
> >
> > I do not have any idea how to manipulate with the signature of a file.
> > Could you please redirect me to any resource where I can get the
> > information.
> >
> >
> > Thanks.
> > Venkat
> >
> >
> >
> > "Jezebel" <dwarves RemoveThis @heaven.com.kr> wrote in message
> > news:eV33XyTTEHA.3844@TK2MSFTNGP11.phx.gbl...
> > > The signature (initial bytes) of an MDB file is:
> > >
> > > 00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 64 74 20 44 42
> > >
> > > When you write the back-up, change the initial bytes to something
else.
> > When
> > > you restore, change them back. Not very secure, but sufficient for
> simple
> > > purposes.
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Venkat" <vreddyg RemoveThis @hotmail.com> wrote in message
> > > news:%23MRQIbTTEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > > Hi,
> > > >
> > > > I've an application developed in VB 6.0 and DB is MS-Access 2000.
> > > > Now I would like to provide backup and restore feature in the
> > application.
> > > > That is to say that to create a backup file of the database which
can
> be
> > > > saved.
> > > > For some reasons, I do not want to give an MS-Access DB as a backup
> > file.
> > > >
> > > > Could anybody please tell me what type of file should I give a
backup
> > > file.
> > > > Please note that the backup file should not be readable/accessible
by
> > any
> > > > other application.
> > > >
> > > > Kindly help. Thanks in advance.
> > > >
> > > > Venkat
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
DNagel

External


Since: Jun 15, 2004
Posts: 1



(Msg. 6) Posted: Tue Jun 15, 2004 4:09 pm
Post subject: Re: Backup and restore feature on VB6 application [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Venkat wrote:
> Hi,
>
> I've explored MSDN thoroughly, unfortunately, I could not find any useful
> information.
> Please help me by providing some other resources.
> Please.

Lets think about this...

The 'signature' you were given earlier is actually the first n number of
bytes in an MDB file... This same count of bytes needs to be altered
in some way so that your file can reliably be altered in both directions
(from and back to a valid MDB) so as to provide some means of protecting
your information or your methods...

so...

Open the real MDB... I suggest using Binary file access ala:
Dim ff as integer: ff = freefile(0)
Open "FileName1" for Binary as #ff

Open a new blank file:
Dim ff2 as integer: ff2 = freefile(0)
Open "FileName2" for Binary as #ff2

Read in all the bytes of the file.

Dim s() as byte
Redim s(0 to lof(ff)-1 as byte
get #ff,, S

Now, you may alter them in any way you please, but I might recommend a
simple XOR
Dim i as long
For i = 0 to 9
s(i) = s(i) Xor 255
Next

Write out the altered MDB to the recieving file...

put #ff2,,S

Close the file handles

Close #ff : Close #ff2

The reverse operation is very similar...

Open the Altered MDB:
Dim ff as integer: ff = freefile(0)
Open "FileName2" for Binary as #ff

Open a new blank file:
Dim ff2 as integer: ff2 = freefile(0)
Open "FileName1" for Binary as #ff2

the rest should remain the same...

hth,
D.
 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
Venkat

External


Since: Apr 12, 2004
Posts: 5



(Msg. 7) Posted: Wed Jun 16, 2004 2:18 pm
Post subject: Re: Backup and restore feature on VB6 application [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for the info DNagel.

Venkat


"DNagel" <NOTGrandNagel.RemoveThis@hotmail.com> wrote in message
news:OPc5pVvUEHA.1152@TK2MSFTNGP09.phx.gbl...
> Venkat wrote:
> > Hi,
> >
> > I've explored MSDN thoroughly, unfortunately, I could not find any
useful
> > information.
> > Please help me by providing some other resources.
> > Please.
>
> Lets think about this...
>
> The 'signature' you were given earlier is actually the first n number of
> bytes in an MDB file... This same count of bytes needs to be altered
> in some way so that your file can reliably be altered in both directions
> (from and back to a valid MDB) so as to provide some means of protecting
> your information or your methods...
>
> so...
>
> Open the real MDB... I suggest using Binary file access ala:
> Dim ff as integer: ff = freefile(0)
> Open "FileName1" for Binary as #ff
>
> Open a new blank file:
> Dim ff2 as integer: ff2 = freefile(0)
> Open "FileName2" for Binary as #ff2
>
> Read in all the bytes of the file.
>
> Dim s() as byte
> Redim s(0 to lof(ff)-1 as byte
> get #ff,, S
>
> Now, you may alter them in any way you please, but I might recommend a
> simple XOR
> Dim i as long
> For i = 0 to 9
> s(i) = s(i) Xor 255
> Next
>
> Write out the altered MDB to the recieving file...
>
> put #ff2,,S
>
> Close the file handles
>
> Close #ff : Close #ff2
>
> The reverse operation is very similar...
>
> Open the Altered MDB:
> Dim ff as integer: ff = freefile(0)
> Open "FileName2" for Binary as #ff
>
> Open a new blank file:
> Dim ff2 as integer: ff2 = freefile(0)
> Open "FileName1" for Binary as #ff2
>
> the rest should remain the same...
>
> hth,
> D.
 >> Stay informed about: Backup and restore feature on VB6 application 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]