Results 1 to 8 of 8

Thread: back up tables

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    back up tables

    Hi
    I have 5 PC clients and a server.Each user on each PC enters data to a table"Patron".I want to create a project that prompts the user when shutting down his PC by asking him if he wants to send his data to the server,if yes all the records from the table patron are copied to a table inside the server.That way when all the users shut down their PC,all the data are backed up to a single table inside the server.I am planning to use VB6 and Access database.Can anyone guide me through the steps of accomplishing this kind of project?
    thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: back up tables

    You have Access on the client, what kind of database will be on the server?

    You have 5 people using the Application. What if all 5 people say "Yes, I want to back up the Patron table? What will be on the server will be what the LAST person copied there, thus, completely overwriting what the other 4 wrote. How will this be dealt with?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: back up tables

    well also there is an Access table on the server side.For example if user1 has 20records,user2 has 25 records,user3 has 15records,user4 has 35 records,user5 has 40records, so the server table must contain the sum of records from the 5 users(in our case 135 records).

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: back up tables

    Ok. That would work. You would need to write and execute and SQL INSERT INTO statement so that each user would create new records rather than overlay existing records.

    I would also add another two fields to the table in the server database, and those would be Updated_By and Updated_Time. I would write the Windows login Id and date/time on each INSERT so that you would always know who added what records, and when they added them.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: back up tables

    That's a very good idea Hack,but I still have one problem.I want that when the user shut down his computer,before the computer executes its command ,to show him a prompt dialogue asking him if he want to send his data to the server.so when the user clicks on shut down,before the computer executes the command,how can I display my dialogue?
    thanks

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: back up tables

    I would also add another two fields to the table in the server database, and those would be Updated_By and Updated_Time. I would write the Windows login Id and date/time on each INSERT so that you would always know who added what records, and when they added them.
    How can I insert the Windows login Id to the table?How can i obtain the Windows login Id ?
    thanks

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: back up tables

    Quote Originally Posted by engnouna
    That's a very good idea Hack,but I still have one problem.I want that when the user shut down his computer,before the computer executes its command ,to show him a prompt dialogue asking him if he want to send his data to the server.so when the user clicks on shut down,before the computer executes the command,how can I display my dialogue?
    thanks
    You should be asking them to do a backup when your program shuts down, not the computer.

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: back up tables

    Quote Originally Posted by engnouna
    How can I insert the Windows login Id to the table?How can i obtain the Windows login Id ?
    thanks
    Use the GetUserName API.

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