A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Importing from Oracle extract...



 
 
Thread Tools Display Modes
  #1  
Old June 5th, 2004, 05:24 PM
JasonS
external usenet poster
 
Posts: n/a
Default Importing from Oracle extract...

Hello!
Please, help me with this issue: I got a file which is an extract from
Oracle database, and I want this file to be programmatically imported into
MS Access table.
This is an example of what kind of data this file contains:
243,177,699990000,"222222222222222222","3333333355 55555","
",0,"AddressesOfsomeone",Yes
The last line contains nothing but a graphical square :-/
The first line does not contain headers for fields.

The file contains about 500 000 of such lines, so it's impossible to import
this file into Excel. When I'm importing it into Access using
DoCmd.TransferText method, I get an error message telling that there is no
F1 field in corresponding table in Access database.
The problem dissapears when I'm manually removing "-signs from that file.
But, is it possible to do it programmatically using VBA?
How can I open for editing an external file in txt format in VBA and remove
all " and that fu**ing square at the end of the file and finally save it to
the hard disk?

Thank you 4 helping me
Greetings from a stupid polish guy


  #2  
Old June 5th, 2004, 09:41 PM
Steve Schapel
external usenet poster
 
Posts: n/a
Default Importing from Oracle extract...

Jason,

Answered in macros newsgroup.

A hint for the future... if you really think it is important for your
post to appear in more than one newsgroup (in practice, it is seldom
necessary), please cross-post (i.e. address the same post simultaneously
to both groups), rather than multi-post (i.e. send a separate copy of
the message to each group). Thanks.

--
Steve Schapel, Microsoft Access MVP

JasonS wrote:
Hello!
Please, help me with this issue: I got a file which is an extract from
Oracle database, and I want this file to be programmatically imported into
MS Access table.
This is an example of what kind of data this file contains:
243,177,699990000,"222222222222222222","3333333355 55555","
",0,"AddressesOfsomeone",Yes
The last line contains nothing but a graphical square :-/
The first line does not contain headers for fields.

The file contains about 500 000 of such lines, so it's impossible to import
this file into Excel. When I'm importing it into Access using
DoCmd.TransferText method, I get an error message telling that there is no
F1 field in corresponding table in Access database.
The problem dissapears when I'm manually removing "-signs from that file.
But, is it possible to do it programmatically using VBA?
How can I open for editing an external file in txt format in VBA and remove
all " and that fu**ing square at the end of the file and finally save it to
the hard disk?

Thank you 4 helping me
Greetings from a stupid polish guy


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.