A Tough One - Importing A File Into A NEW Table
May 25, 2006
I work for a company that has a mainframe application that produces "outgoing" files. They are downloaded to a server and converted to ASCII (all at one time) and then ftp'ed to various clients. We are converting to a client server application and I am in charge of verifying that the mainframe application files (converted) are EXACTLY the same as the server application files. I came up with a process of loading the files to access databases and then with a series of queries and reports produce a list of exactly what doesn't match, which record, what positions and display the two fields that are mismatching.
My problem is that when I try to load the Mainframe file (note that it has already been converted and "eyeball to eyeball" the files are alike) using the "new" / import functions, Access rejects the file because it is greater than 65000 bytes. If I cut the file down to under 65k bytes it loads fine. I can load a 500,000 byte file that was created on the server in the first place.
Any suggestions? I can't change any of the processes that create the files. But I can change copies of the files so that I might be able to get them to load so I can verify that the data inside is the same. I'll let the geeks figure out how to fix the file/record control stuff.
(wouldn't have this problem if I was back on a mainframe!!!!)
Mac
View Replies
ADVERTISEMENT
Feb 21, 2014
I am trying to import a csv file into a table... it works fine however it put all of the row in just one column ...
DoCmd.TransferText TransferType:=acImportDelim, TableName:="tblTempImport", _
Filename:=CurrentProject.Path & "/xxx.csv", HasFieldNames:=False
And i end up with tblTempImport only having one column F1....
View 14 Replies
View Related
Apr 10, 2007
Hello - I want to import a text file into a table in a database. The text file looks like this:
00001 06006025 1420 0010 Health Insurance 7
00001 06006025 1425 0010 Life Insurance 7
00001 06006025 1430 0010 Disability 7
00001 06006025 1440 0010 Profit Sharing 7
There is no consistent delimiter. The text field is making things complicated because there is no accurate way to separate the text field from the last number in each line ('7') which needs to be stored in a different column.
Is there a way to insert quotations arond the text string so the quotation mark can be used to distinguish it when importing into excel or a database table. This may work because the starting position of the text string is constant. The ending position would have to be defined as the place where the number appears ('7' in this case). Then, quotations need to be placed around the text string.
Is this possible? Any advice will help tons!!!
View 5 Replies
View Related
Mar 16, 2008
I'm able to do the import, but I can't get the time of day to show up in military format, which seems more useful when I'm wanting to filter out certain blocks of time later on.
The attached jpg shows the format of the source txt file. The time is shown as 09:30 AM for instance. The attached screen shot for the import text wizard doesn't mean much to me at this point, because no settings seem to work. I've also attached the Import Specification window.
What's been happening is I've been getting a table with field2 showing time in this format 09:30:00 AM where the AM is random and unreliable followed by field3 showing the correct AM/PM designation. This is when I just let all the text wizard stuff run by default settings.
I can then go into the table in design view and change the format of the time of day to hh:nn which gives me 09:30, but then I'm still stuck with the problem of converting all the figures in fields 2 and 3 into something I can work with. BTW, Hh:mm:ss defaults to hh:nn.
Would it be better perhaps to first convert my source file to another format such as csv?
View 3 Replies
View Related
Jun 13, 2006
Hi,
I have a text file with comma separated values. What I want is a single access query to import this text file into an access table. I know this can be done through import text wizard in access - but what I need is a single query.
I have done the same thing for transferring oracle data to an access table - but for text file to access, I am getting -7778 error.
This is the query I have written
SELECT * into MY_ACCESS_TBL from [odbc;Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=MY_TEXT_FILE_PATH;].[MY_TEXT_FILE.txt];
Please help!!
Regards,
Suneesh
View 7 Replies
View Related
Jun 27, 2012
Is the record is already existing in access, but a few fields are blank, is there any way to import an excel file that just updates those blank fields for the specific record?
For example,
I have an excel file that includes files that are ready to ship out. My access database already has those file names, but does not have the shipping box number. Is there any way to import the excel file into my database, have it find those specific file names and update the shipping box number field? The excel file won't be adding any new records, just appending existing records.
View 1 Replies
View Related
Nov 30, 2012
I'd like to be able to filter through a .dat file like that (which is pretty much just like a .txt file as far as I can tell) and have that data appended into a table by way of a command button.
The annoying thing is that the data would have to be pulled out of the .dat file by position into columns like this:
Example line:
Code:
09 19192 00010212b1 5010570223
19192 = Ticket (Will be 5 digits long)
0001 = Quantity (Should be 4 digits long)
0212b1 - Location (Will be 6 characters long)
5010570223 = Article (Will be 10 characters long (not numbers))
by the way, let's say the .dat file will be in folder C:CENTURYWTERM.
View 5 Replies
View Related
Jan 29, 2015
I am importing csv files into tables in a batch routine and I get the following error messages. The error number is always 2391.
Field 'F1' Doesn't Exist in Destination Table
Field 'F4' Doesn't Exist in Destination Table
Field 'F36' Doesn't Exist in Destination Table
I understand the first one and can find references to this on the web but the F4 and F36 escape me.
All fields required do actually exist in the table so the real problem is elsewhere.
P.S. I now think that it may be that there are embedded commas in one or more of the text fields and that the number following the 'F' indicates the position of the field in the table. I will check in the morning or create the csv files using commas and quotes.
View 1 Replies
View Related
Oct 6, 2014
I currently use the following to import a csv file into a staging table and then append and save the data to a table - however it doesnt use the headings from the csv file and creates an error table and a blank record where the headings should be apart from one column where it copies the name.
Would it be possible to use the headings as field names or just omit them completely and use the standard f1 f2 f3 etc access generates in the tmp table?
Code:
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select the CSV file to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "CSV Files", "*.csv", 1
.Filters.Add "All Files", "*.*", 2
[Code] ....
View 1 Replies
View Related
Jul 19, 2013
Code beneath worked perfectly with Access 2003.Now we switched to Access 2010 and it generates a table where data isn't put into my 77 fields like before, but seperated into 1 field, separated by some ;;;.I am not good with programming.
Dim rst_data As Recordset
Dim oldname As String, newname As String
DoCmd.DeleteObject acTable, "TBL_import_TPXP_Radi_Evvd"
DoCmd.TransferText acImportDelim, , "TBL_import_TPXP_Radi_Evvd", "N:APPLSHAREPRDQSIGMKTDISTPWBUSPB1815RADIEV IMPACT.CSV", False, ""
[code]...
View 2 Replies
View Related
Aug 25, 2004
Hi
I need to create a command button to import a tab delimited text file into a table in Microsoft Access using VBA Code.
I have set up the button however I am unsure as to how I should approach it and what code i need.
If anybody has any suggestions I would be very grateful.
Kind Regards
Elaine
View 1 Replies
View Related
Jul 9, 2014
I have 12,000 cvs that i need to get into An access database so i can start to extract email info etc. They are stored in one folder All Cvs under each of their names edc.txt (i have converted them to .txt) i want to create one table with two fields name (taken from the cv filename and contents (taken fromthe contents of the .txt file). I am using Access 2007.
View 2 Replies
View Related
Nov 14, 2006
I want to put a File Browser on a form so my users can browse their desktop for the correct TXT file they want to be imported into the database. At first, I did nto think this would be hard but it seems as though it is some what of a challenge.
Any help is appreciated.
Thank You,
Marc
View 1 Replies
View Related
May 5, 2005
Hi all,
I am trying to upload a .csv file in a table using the tRansfertext method in vba. I have atext field having alphanumeric values. The upload is excluding the some values and generating a new error table. How do I get rid of this error.
Do I have to use a specification name. I have new .csv file to be uploaded every week, How do I work on the spec file ?
Any answers please..
Thanks
Nira.
View 8 Replies
View Related
Apr 5, 2005
Hi,
I've been away from Access for a while but now I'm back in action :) . Maybe I'm rusty from the lack of practice but I think this one will be hard to resolve. So here it is:
I have a form in datasheet presentation and when I double-click on a record, I need to open another form. This I can easly do, now for the hard part, the form I must open has two tabs, one for a specific region and another for the rest of the world. I want to make the sub-form point to the concern record, which I can easily know, from the first form. So, basicly, I need to make a sub-form point to a record from another form.
Currently, I can open the sub-form alone, without going through the parent form, but I can't make it point to the concern record. I can use the "where" clause of the "docmd.openform" command but I would like the form to just be on the concern record and still have access to the entire recordset.
Well, that's about it. I told you it was going to be a hard one, well I still think it's hard :) .
Maybe a little code snippet would help:
Private Sub PEIN_DblClick(Cancel As Integer)
Dim MemberID As Long
Dim ComputerID As Long
MemberID = Me.MemberID
ComputerID = Me.ComputerID
If Me.Region = "ON" Then
'This is where I don't know how to do it
'I tried a "OpenForm" but I can only access the parent form
'And not the sub-form
Else
End If
End Sub
If you need more infos to help me, please don't hesitate to ask, I'll be monitoring my e-mail box closely :D .
Thx,
JCA
View 3 Replies
View Related
Aug 7, 2006
We have received a zip file from a new client containing several thousand loans. The problem is that when I open the file as text all of the data is in one "field" meaning instead of going across the data goes down.
loan type,
loan number,
origination date,
loan term,
lo type,
etc....
Then it starts over with the next loan. There are over 17,000 lines.
How can I import the text file and have the loans go across. Even when I have imported the file using comma delimited it still imports them going down. Even if the comma delimited would work, I would still have issues because Access would not know when the new loan began to move it to the next row.
Any thoughts or suggestions? Sorry for my rambling.
View 6 Replies
View Related
May 27, 2005
Hey,
I have a text file i wish to link up to one of my tables. The problem is that even if i try to import data from that file i get "Text file specifikation field separator matches decimal separator or text delimiter." message and after that one an err that the file cant be imported. Does anyone know why?
Thats the sample of my file:
'PV','045.302','KROG VEN S PNEU POG','JOHN-VALVE + AIR TORQUE','JV-9301NC-BW + AT051DA','','','','15','8','VANI','','1.4408','PTF E','ZRK'
View 4 Replies
View Related
Mar 12, 2008
All, I have code to import multiple text files into multiple tables in access 2003 There are about 15 tables It works but I have two problems. 1st I was converting the files from another source to text and placing them into a folder where I created import specification files. The problem is I need to automate the conversion part. How do I use VBA code to look at the file and add the extension .txt so that the program can find the file in the code. Here's part of my code. I didn't list all 15
'Import Text files into corresponding tables
DoCmd.TransferText acImportFixed, "PhoneNoProblems Import Specification", _
"PhoneNoProblems", "X:DB_Working 017_ErrorsTextFilesPhoneNoProblem s.txt", True
DoCmd.TransferText acImportFixed, "StrangeZipcodes Import Specification", _
"StrangeZipcodes", "X:DB_Working 017_ErrorsTextFilesStrangeZipcode s.txt", True
In the textfiles folder, before the filename with .txt exist I have to add the .txt How do I add it automatically before the import?
2nd I need a cleanup routine to remove the additional lines in the text files like: list and sort which can appear randomily throughout the text files.
I hope I've explained this so you can help me
Thanks
View 9 Replies
View Related
Oct 26, 2006
Hi! There was a problem that one of the members had a while back, and the solution was never posted. Now, I am having the exact same problem. Here's the link.
http://forums.aspfree.com/microsoft-access-help-18/importing-multiple-text-files-125634.html
When I compile, it works ok, but then when I click my command button, it says I can't import this file. Any ideas?
KellyJo
View 1 Replies
View Related
Aug 25, 2011
I receive a .txt file daily and want to import the information into a table. My problem is that the currency values in the .txt file do not contain a decimal. For instance $7.12 will come in showing as 712. How do I get Access to recognize it with the decimal?
View 2 Replies
View Related
Jun 22, 2005
I want to return a list that contains each employee's ID, the date of their last payrate adjustment, and their current payrate. Note that in the table below, employee 1002 was a bad boy in March of 2005, and his hourly rate was reduced to 14.00.
TableName: Employees
EmployeeID............Date.............PayRate
-------------------------------------------
....1001...............1/24/03............12.50
....1002...............2/28/03............12.75
....1003...............5/14/03............10.50
....1002...............3/15/04............15.00
....1001...............6/22/04............14.00
....1002...............3/16/05............14.00
The result set should look like:
EmployeeID...........Date.............PayRate
-----------------------------------------
...1003................5/14/03............10.50
...1001................6/22/04............14.00
...1002................3/16/05............14.00
View 1 Replies
View Related
Jul 18, 2006
Every body has worked on a query using parameter
[Forms]![Form Name]![Name of Field of Form] to get the desired result.
It works fine to use for single field. But I could never see this to be used in may fields at one go. For example how about this logic.
Table Name : Document Records, Fields
1st submission letter no
2nd submission letter no.
3 submission letter no.
A query using all three fields based on form field [Text2].
Means if may be letter no. 12 was used for two submissions, now if I put 12 in form filed and run query it does not display any thing.
Can some body figure it out and help?
A sample question is attached
View 2 Replies
View Related
May 31, 2005
Hi, I have an xml which fields of text and some of numbers.
When I do: File --> Get External Data --> Import; I'm able to import the file.
The problem is that not all the data is entered in the fields. The colums containing the text are excluded.
While importing, I did choose the option "Structure and Data", so it should work.
Any suggestions on to why it is doing that?
Thanks.
View 2 Replies
View Related
Aug 1, 2005
hi, i have struggled to import some data from an excel file into an sql database..
i have used phpmyadmin and certain code snippets but have failed miserably..
basically my excel file has lots of data, and within each cell, each bit of data is in single quotes...
eg.
'jonathan' '23' 'hardman' 'cheese'
there are no headings in the excel file (as in column or row titles) the data is just raw.
once i have made the table (with the appropriate fields and datatypes for the csv file) how can i import that data into a table using ms access???
View 2 Replies
View Related
Nov 3, 2005
I have a dbf file that I need to somehow get the table data out of, and into access, excel, or some other usable format. I searches the MS Knowledge Base and read several articles on updating the Jet 4.0 drivers (up to date) and updating Foxpro ODBC drivers, etc. I also searched these forums, and I have yet to find any solution that works.
I think this dbf file might be Foxpro, but I'm not sure. I don't know anything about Foxpro. I was getting an error message "unexpected error from external database driver (8961)", until I read an MS article stating that I should change the name of the Borland folder to BorlandOld and try re-importing. Now Access 2003 just says: "external table not in the specified format".
View 3 Replies
View Related
Apr 3, 2006
Loss of Primary Key when importing csv file
Hi All,
We are submitting an Access db table with ID as primary key to an outside company for processing. We export it as csv file and that's how it comes back.
After importing it back, we noticed that our IDs, which previously had 'gaps' as a result of deleted records, had been changed in to a new continuous sequence (Autonumbered). This, of course, completely destroys our database since related tables depend on IDs being unchangeable.
We ***suspect*** that the IDs are being destroyed during the process of re-importing the csv file. We are using the Access import wizzard.
Access msg: "Access recommends that you define a Primary Key for your new table". We then are given the following options:
1Let Access ADD primary key
2Choose my own primary key
3No primary key
During Option 1, the ID column is displayed and high-lighted. But we do NOT want that option since it offers to ADD a primary key, whereas we already have one (ID). At most, we want to 'declare' or 'define' a primary key, but we do not want Access to ADD one.
So we try Option 2, hoping that this will give us the chance to CHOOSE ID as our primary key. But the moment we select that option, the ID column disappears. We are not given the chance to select ID as our primary key.
So we try Option 3, hoping to re-instate ID as primary key as soon as we have an Access table again. But the moment we select this option, the ID column disappears.
-----------------------
If we GO THROUGH with Option 1, we notice that Access has renumbered our ID, the IDs of all our 'deleted' records have been re-assigned. Or so it appears.
If we GO THROUGH with Option 3, the resulting table does not contain an ID column at all.
Of course, the damage may have been done by the outside company which processed our file, but if so, we have to prove it, and we have to take measures to avoid it.
Any comments and advice?
Thanks.
Adrian
View 3 Replies
View Related