GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rating: Thread Rating: 8 votes, 5.00 average.
  #1  
Old 18-May-2004, 12:06
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road

Text Doc to Access DB


Hello,
I am trying to do from what I understand is a simple thing. I have a text file, which is comma delimited. I want to create a C++ program which will take the information and put it into a Microsoft Access format. So more or less the program will take the data in a text file and transfer into a database.

Now I know that I could just open Access, then use the open button and import the text file that way, but that is not my goal. I want to do all this using a seperate C++ function.

Is this possible? Could you give me a suggestion on how to do it. Thanks for your time.
~David
__________________
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
  #2  
Old 18-May-2004, 13:34
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
might be able to do it rather simply using MFC?
__________________
spasms!!!
  #3  
Old 18-May-2004, 13:37
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road
Please excuse my ignorance but what does MFC stand for?

Beside that, I am sure it is much easier, but I must use C++, because this only a very small part of what I want to do. Thanks

I am interested to know how you would do this in MFC though
__________________
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
  #4  
Old 18-May-2004, 13:47
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
MFC = microsoft foundation classes. its visual c++. just as visual basic is to basic. MFC probably has the classes required to have access to Microsoft office components. I've never done any MFC programming, i just recently learned what it exactly means
What you would probably want to do is learn how to access the Microsoft Access functionality thru MFC. Once you learn how to do that, then you can just create a button which when clicked will directly make use of the Export Text files option in Microsoft access. ( Kind of like OLE in visual basic?? )
Max Payne might be able to help you out if you post in MFC forum, which is the link just below the c/c++ forum.

EDIT: doing it thru ordinary c++ would mean that you would take a text file and then add the access file formatting to it. I am not sure how you would go about finding out the formatting that access adds to its own files.
__________________
spasms!!!
  #5  
Old 18-May-2004, 14:10
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road
Hmmm....Okay I will post it there. Thanks for your response.
__________________
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
  #6  
Old 18-May-2004, 16:28
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,243
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all
This task is not as simple as it sounds, although it a heck of a lot simpler that trying to learn MFC (microsoft's f**n cr*p ) to accomplish it.

You need to look into functions to access databases to get a 'connection', open the DB, access the tables, and such. I don't know what Access has for this activity but I'm sure it's built in somehow/somewhere. Look as MSDN to see what they have to say about it.
__________________

Age is unimportant -- except in cheese
  #7  
Old 18-May-2004, 20:30
Max Payne's Avatar
Max Payne Max Payne is offline
Regular Member
 
Join Date: Apr 2004
Location: 3° 08 North 101° 42 East
Posts: 332
Max Payne is a jewel in the roughMax Payne is a jewel in the roughMax Payne is a jewel in the rough
Quote:
Originally Posted by WaltP
This task is not as simple as it sounds, although it a heck of a lot simpler that trying to learn MFC (microsoft's f**n cr*p ) to accomplish it.

WaltP, I don't think that learning MFC is that hard. If you have a good understanding in the basic c++ fundamentals such as pointers, classess and structure, I'm sure that it would be really simple to learn. MFC is only collections of classes for gui and windows programming which is not much different that the normal c++ classess. Its almost the same as win32 programming. And for someone like you who has strong understanding in C/C++, I'm sure it would be a lot easier for you to understand and learn MFC, unless you have a grudge against M$. ;-)
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds
  #8  
Old 18-May-2004, 20:45
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
I like Microsoft's products, but I do not like their business practices in any aspect. They make some great software... but they're a monopoly, and they don't support their old products, provide support or compatibility with products that they didn't produce or don't endorse -- it's my undserstanding that they purposely make it difficult to port their products to other operating systems -- they don't work towards solutions that are good for everyone, only solutions that is good for microsoft.
__________________
-Aaron
  #9  
Old 18-May-2004, 21:01
Max Payne's Avatar
Max Payne Max Payne is offline
Regular Member
 
Join Date: Apr 2004
Location: 3° 08 North 101° 42 East
Posts: 332
Max Payne is a jewel in the roughMax Payne is a jewel in the roughMax Payne is a jewel in the rough
I have to agree with that aaroncohn, microsoft is sinonim with monopoly. But when you start to work and you employer is MS partner, you have no choice but to follow the standards that was put by MS. Every product we made is made for use with MS products and no way you can embed with other products expecially from its competitors.

I recently asked to make the application we build could interact with Internet browsers, ond of course using MFC and Hooking techniques. And this task seems really easy when trying to hook MS InternetExplorer where the MFC has full support to do this task. Then I tried to do the same with Netscape and Mozilla, guess what, MFC does not support Those browser, and you have to build your own COM objects to make it possible. Building a COM object that can interact with netcscape and mozilla is not an easy task, It would take months to do that... and even if I can, there no guarantee that it would work smoothly as it does with MS IE.

MFC has lots of support and feature that ease your work with MS products and its partner, but not with other products, and we programmers are stuck between this, you must use MFC and find a way to interact with non MS stuff.
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds
  #10  
Old 19-May-2004, 08:21
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
yeah and not to mention they're thiefs too...
bill gates claims that the world of computing is as far as it is today because of microsoft. what a bunch of crap!
__________________
spasms!!!
 
 

Recent GIDBlogMeeting the populace by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
burning problems PLEASE PLEASE HELP kelticeire Computer Hardware Forum 4 01-Dec-2006 15:39
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28
CD Buring Failed skanth2000 Computer Hardware Forum 1 15-Nov-2003 03:52
text field problm zuzupus Web Design Forum 3 04-Sep-2003 05:18

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:03.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.