473,395 Members | 1,653 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,395 software developers and data experts.

what to use for holding imported data

hello...


I want to import table in my application and i want to store it temporary so that i can make calulation


after making calculation that temporary data should be dump


how to implement this program

how to store i/p table temporary in my access vba application

I am new to this....
Aug 24 '12 #1
3 1592
TheSmileyCoder
2,322 Expert Mod 2GB
There are several ways of doing this.

You could use the same table each time and simply use a delete query from code when your done with your calculations, or when you close your form, or when you close the application or.....


You could create the table on the fly with VBA code, or again, by using a query, do the import, then delete the table by VBA code or query.


Really it depends on more details about how you want it to function, and how you want to do it. My personal preference is almost always to use VBA, but in the end, you are the one who has to implement it.

Where do you get your temporary data from? Is it always in the same format?
Aug 24 '12 #2
can you tell me how to create temporary table to hold imported data

this table should be dump after entire operation
Aug 24 '12 #3
TheSmileyCoder
2,322 Expert Mod 2GB
This is an example of a query that will create a table tbl_Temp and insert data from tbl_User:
Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_User.PK_User, 
  2.        tbl_User.tx_UserInitials INTO tbl_Temp
  3.        FROM tbl_User;
Another example creating the table by code:
Expand|Select|Wrap|Line Numbers
  1. Public Sub generateExportTable(strTableName As String, Optional bHazards As Boolean = False)
  2. 'This procedure creates a temporary table to be used in a report or to be exported for review
  3.  
  4.     'If teh table allready exists, delete it
  5.     If TableExists(strTableName) Then
  6.         DoCmd.DeleteObject acTable, strTableName
  7.     End If
  8.  
  9.  
  10.     'Create the table
  11.         Dim tblDef As TableDef
  12.         Dim db As Database
  13.         Set db = CurrentDb
  14.         Set tblDef = db.CreateTableDef(strTableName, , , CurrentProject.Connection)
  15.         Dim fld As Field
  16.  
  17.  
  18.     With tblDef
  19.         If bHazards Then
  20.             .Fields.Append .CreateField("lngSortNumber", dbLong)
  21.             .Fields("lngSortNumber").Attributes = dbAutoIncrField
  22.         End If
  23.         .Fields.Append .CreateField("lngReqID", dbLong)
  24.         .Fields.Append .CreateField("txtSectionNumber", dbText, 50)
  25.         .Fields.Append .CreateField("txtType", dbText, 20)
  26.         .Fields.Append .CreateField("txtRevision", dbText, 10)
  27.         .Fields.Append .CreateField("memSpecifikation", dbMemo)
  28.         If bHazards Then
  29.             .Fields.Append .CreateField("Comments", dbMemo)
  30.             .Fields("Comments").AllowZeroLength = True
  31.             .Fields.Append .CreateField("Hazard nr", dbMemo)
  32.             .Fields("Hazard nr").AllowZeroLength = True
  33.             .Fields.Append .CreateField("Hazards", dbMemo)
  34.             .Fields("Hazards").AllowZeroLength = True
  35.         End If
  36.  
  37.     End With
  38.  
  39.     tblDef.Fields("txtSectionNumber").AllowZeroLength = True
  40.     ' Append the new TableDef to the database.
  41.         db.TableDefs.Append tblDef
  42. End Sub
Not all of the above code is required, some is specialized for my need, but this gives you an example.
Aug 24 '12 #4

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

Similar topics

0
by: Boban Milenkovic | last post by:
hi, i have a sql2000 server and several msde-clients, which use the merge replication. if i import data from a text file using the dts-import wizard, the newly imported data will not be...
2
by: yee young han | last post by:
I need a fast data structure and algorithm like below condition. (1) this data structure contain only 10,000 data entry. (2) data structure's one entry is like below typedef struct _DataEntry_...
13
by: gtux | last post by:
Hi everybody: I'm new in Javascript, I found some code and there is this: var fruit = { 'apple' : { 'weight' : 10, 'cost' : 9}, 'peach' : { 'weight' : 19, 'cost' : 10} }
1
by: ccr | last post by:
Please view in a text editor so that the columnar text lines up. I used Terminal 9pt font to compose this post and copied/pasted to my newsreader program. I am writing in the hope that one of...
0
by: Stewart Allen | last post by:
Hi there Opinions on the best way to do this. I want to import data from an Excel spreadsheet into Access and want the data to be tested before the tables are updated. At the moment all the...
0
by: Jay | last post by:
I am importing data on a daily basis and I want to assign a value (A, B, C, D, or E) to each record for the purpose of evenly distibuting the data 5 ways so I have the following code: rst1...
1
by: leo | last post by:
Hi, Following is the python scripts: import marshal ...
1
by: rathikrindanagaraju | last post by:
hi plz explain what are the data types available in the IBM DB2 database
1
by: laziers | last post by:
Hi, What kind of data access you will use for the project with very large database : 1. NHibernate 2. Linq 3. Sql queries + stored procedures 4. DataSets
7
by: dynamo | last post by:
We are always being told random binary data cannot be compressed,so i'm wondering what does random data look like.I think it would consist of short runs of 1's and 0's.Any ideas.Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.