473,378 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Need help transfering data from one access db to another

Hi

I have a restaurant billing software developed in vb 6 and ms access db as backend.

now for old data i have created another copy of db and called it the master db.

So periodically i need to transfer data from the current db to the master db also considering the situation wherein the current db may already have some of the data which has already been copied into the master.

right now i am first creating a csv file from the current and then importing it to master and then deleting the data from the current.

However i am facing data loss and data modification after the import which i am not able to figure out.

PLEASE HELP.

Ankur Gupta
email: info@creativityredefined.com
Feb 15 '07 #1
1 1763
Function TransferToMaster(FromDt As Date, ToDt As Date, BackUp As String, Optional PBr As ProgressBar = Nothing) As Boolean
Dim TmpDt As Date
Dim TmpDt1 As Date
Dim Tmp As String, i As Integer
If DoDebug Then
AppDebug "Function TransferToMaster(" & FromDt & " , " & ToDt & " , " & BackUp & ", PBR) Called"
End If
On Error GoTo ErrLog
TmpDt1 = FromDt
frmMenu.MousePointer = vbHourglass
Tmp = Trim(App.Path)
Tmp = Fs.BuildPath(Tmp, "RMV")
If Not Fs.FolderExists(Tmp) Then
Fs.CreateFolder Tmp
End If
Tmp = Fs.BuildPath(Tmp, "Ankur.Rmv")
If CreateCSVFile(TmpDt, CStr(FromDt), CStr(ToDt), , Tmp, True) Then
' Tmp = Trim(App.Path)
' If Not Right(Tmp, 1) = "\" Then
' Tmp = Tmp & "\"
' End If
' Tmp = Tmp & "Ankur.Rmv"
With frmMsg
.msg = "Transfer to Master"
.Show
For i = 0 To 10000
.msg = "Flushing Data: " & i & " of 10000"
DoEvents
Next
End With
Unload frmMsg
If LoadCSVFile(Tmp, True) Then
ClearDbData frmSplash.Con, FromDt, ToDt
MsgBox "Data Transferred to Master", vbApplicationModal + vbInformation + vbOKOnly, "Transfer to Master"
TransferToMaster = True
Else
If Not Trim(BackUp) = "" Then
RestoreBackUp BackUp
Else
MsgBox "Data Integrity is lost. Please Restore Data from Backup"
End If
TransferToMaster = False
End If
Else
MsgBox "Unable to Create Transfer File"
End If
EClose:
If TransferToMaster Then
BackUpDB frmSplash.BackUpDir, False
End If
frmMenu.MousePointer = vbDefault
Exit Function
ErrLog:
AppErrLog Err, "RMSMod", "TransferToMaster", False
If Not Trim(BackUp) = "" Then
RestoreBackUp BackUp
Else
MsgBox "Data Integrity is lost. Please Restore Data from Backup"
End If
TransferToMaster = False
GoTo EClose

End Function
Feb 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Niyazi | last post by:
Hi, I have BIG question and I gues it is the BEST question. I have a problem that I am guessing the best solution is to create some sort ..NET Services. This Service(s) must check every...
2
by: Piotr Karwatka | last post by:
Hi! I have a little problem an qeustion. In .NET Windows Forms I can do something like that: - i have forms - Form1 Form2, on first form i have TextBox1 control on 2nd form I have Button1...
3
by: Chris S | last post by:
I'm relatively new to VB.NET and have what's probably a very simple question. I'm trying to get one form to access (view and modify) data on another form. For example, the startup object is a...
10
by: Walshi | last post by:
Hi all, I'm a relative newby to access and VBA etc. My forms and tables etc are working great and saving lots of time...However... I have two databases with the exact same table format. I want...
0
by: colleen1980 | last post by:
Hi: I have oracle 8i for windows 2000 installed on one dedicated computer. I have different databases in microsoft access. The easiest step to create table in oracle i already did that. Hardest...
1
by: Sandra8784 | last post by:
Hi guys..im developing a system by using C# ..my first task would be transfering data from Ms Excel to Ms Access..i couldnt find C# codes for transfer data from excel to access.. private DataSet...
2
by: Rob Meade | last post by:
Hi all, I have an application which enables a user to register and select a series of resources to go with their profile. At the moment I have an issue on the section where they will select...
1
by: cah1109 | last post by:
my program is supposed to search through an array for a searched name and then post the results in a list box. Now the problem is i need to be able to double click on that results from my search in...
0
by: Ro | last post by:
I've been given the task of transfering data from an access db to sql server 2000. The previous access db was not structured very well so we reconstructed the tables in sql server 2000 to add...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.