473,789 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help transfering data from one access db to another

2 New Member
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@creativity redefined.com
Feb 15 '07 #1
1 1778
ankurgupta76
2 New Member
Function TransferToMaste r(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 TransferToMaste r(" & FromDt & " , " & ToDt & " , " & BackUp & ", PBR) Called"
End If
On Error GoTo ErrLog
TmpDt1 = FromDt
frmMenu.MousePo inter = vbHourglass
Tmp = Trim(App.Path)
Tmp = Fs.BuildPath(Tm p, "RMV")
If Not Fs.FolderExists (Tmp) Then
Fs.CreateFolder Tmp
End If
Tmp = Fs.BuildPath(Tm p, "Ankur.Rmv" )
If CreateCSVFile(T mpDt, 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", vbApplicationMo dal + vbInformation + vbOKOnly, "Transfer to Master"
TransferToMaste r = True
Else
If Not Trim(BackUp) = "" Then
RestoreBackUp BackUp
Else
MsgBox "Data Integrity is lost. Please Restore Data from Backup"
End If
TransferToMaste r = False
End If
Else
MsgBox "Unable to Create Transfer File"
End If
EClose:
If TransferToMaste r Then
BackUpDB frmSplash.BackU pDir, False
End If
frmMenu.MousePo inter = vbDefault
Exit Function
ErrLog:
AppErrLog Err, "RMSMod", "TransferToMast er", False
If Not Trim(BackUp) = "" Then
RestoreBackUp BackUp
Else
MsgBox "Data Integrity is lost. Please Restore Data from Backup"
End If
TransferToMaste r = 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
595
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 hour the data that reside on AS400 and transfer into the SQL Server. Services also have to be run in between 8:00 AM and 5:00 PM
2
1510
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 control - on second Form i can acces data from Form1 like that: for example: MessageBox.Show(Form1.TextBox1.Text);
3
3383
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 form called "FormA". This form contains a string called "ImAString." FormA then opens FormB. How can FormB read from/write to "ImAString"? Thanks for your help, Chris S.
10
2199
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 db1 to be used to input data by a remote operator, when she is ready I want her to be able to click a control button to email her new data to db2. This new data will be added to the table in db2 ready for further processing.
0
1113
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 thing which i dont know how to i write process and where i write process so that on every 24 hours all records from all access databases will be dump into oracle database tables. Thanks.
1
841
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 GetData() { try { string strConnectionString =string.Empty; strConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\UserData\\MEIMaintGUI\\SCM@MP\\SCM@MP\\bin\\Debug\\db1.mdb" ; OleDbConnection cnCSV =new...
2
1806
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 the resources, this is done by launching a popup window, displaying the list of available resources and then the user can select one, in turn this should then populate the parent window.
1
1096
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 the first list box and place it in another list box in a second Form...I NEED THIS TO PASS A CLASS. any help is greatly appreciated
0
1623
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 better table structure and more functionality. What I want to be able to do is transfer the actual data in the access tables to the new tables in the sql server 2000 db. Does anyone know of a simple way to do this? I've been looking into CA...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.