30. oktober 2004 - 12:41Der er
12 kommentarer og 1 løsning
headings på import af fastbredde textfil
Hej,
jeg sidder med en ret stor txtfil som jeg gerne vil importere til access. Det virker egentligt fint, men jeg kan ikke få headings (feltnavne) på min import.
Hvis jeg laver samme forsøg med en csv fil, så har jeg mulighed for at vælge at første linie indeholder feltnavne - men den knap kommer ikke frem ved import af fastbredde textfiler.
Lige nu kører jeg filen igennem et lille prog som laver den til csv - men jeg ville gerne undvære den arbejdsgang.
Hos Computerworld it-jobbank er vi stolte af at fortsætte det gode partnerskab med folkene bag IT-DAY – efter vores mening Danmarks bedste karrieremesse for unge og erfarne it-kandidater.
When you import the file using the import text wizard, you can choose "First Row contains field names". You can then save the import specification for use later.
The idea of importing to an already named table is not so good in this case. Tabels differ each time and contain more than 100 fields - i don't want to type them in manually :-)
When you import into a none existing table then the columns will be given a default name, can you not use these column names? I'm not sure if it is possible otherwise. But if I find a solution then I'll get back.
Off course i can use the default given names - but they give no info (field1, field2....) - i would prefer to have the real names instead (and they are placed in the first line in the text file - so why not use them).
I seems strange to me that the function doesn't exists when using fixed length txtfiles - when it exists for csv files ??
I've had a bit of a play around with this now, and it seems that it isnt possible. If you make an import specification you can then use this in code to import files with the same layout.
Thanks for the effort terry - so I am back at square one :-)
If you post an answer I will assign the points to you.
Do you by the way know the limitations of an access db. I have an approx. 3GB pure textfile i am planning to convert into a db - but I am not sure if access can handle it. I would normally prefer to use msde for tables that size - but the textfile is formatted so i can import directly (except headings ;-) ) and here the access interface would be nice.
Access is limited to 2 GB per database, and actually MSDE has that same limit (I think) :ø( 3 Gb is a LOT of data. If it is to be split into more than one table then you could have a table in its own dB then link the tables into one.
I've posted an answer 30/10-2004 14:06:47
If I do happen to find another solution, then I'll let you know.
thanks! Microsoft introduced MSDE for free to ty and get people to go for SQL Server which costs money. Its a pitty it has a limit of 2Gb, but they obviously have to draw the line somewhere, and as its mostly used for small amounts of data and only a few users it is actually a very good alternative to Access dB's.
Once again thanks
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.