|
-
May 12th, 2006, 05:20 AM
#1
Thread Starter
Fanatic Member
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
-
May 12th, 2006, 06:10 AM
#2
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?
-
May 12th, 2006, 06:25 AM
#3
Thread Starter
Fanatic Member
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).
-
May 12th, 2006, 06:45 AM
#4
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.
-
May 12th, 2006, 07:08 AM
#5
Thread Starter
Fanatic Member
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
-
May 12th, 2006, 07:21 AM
#6
Thread Starter
Fanatic Member
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
-
May 12th, 2006, 07:30 AM
#7
Re: back up tables
 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.
-
May 12th, 2006, 07:32 AM
#8
Re: back up tables
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|