GIDForums  

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

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 18-May-2004, 14:11
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, 14:13
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road

By the way...


I guess I would not mind doing this in Visual either, but I would prefer just regular C++. Thanks
__________________
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.
  #3  
Old 18-May-2004, 19:49
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
Hi,

I'm not sure of how to import a text file into a access database, you have to check MSDN for info on MSAccess.

Are you familiar with MFC, I'm not suggesting you to learn MFC since you prefer to use the normal c++, but take a quick look at what it has to offer. I haven't done any database programming before and not interested to do it. I can give a hint MFC classess that could help you achive what you want to do.

"Microsoft ActiveX Data Objects (ADO) allow you to manipulate and store your data in a database server through an OLEDB provider, and as it provides dual interface you are able to use it from both scripting languages such as VBScript and JavaScript as well as C++. It has so many advantages such as high speed, low memory overhead and the most important one, ease of use."

for more info, check out this Article On MSADO

This is an article provides classess which would make easier to work with ADOCAdoDatabase

Now, with Ado you can access the database and create a new table and insert the data from the file to the database.

This is just a suggestion or to give you a hint on what to do. there are more classess which works with ADO and you should find the best that suits your needs or make your own classess.

Hope that Helps.
__________________
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
  #4  
Old 20-May-2004, 09:52
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road

article


Hey,
your articlew were very helpful. Thanks
__________________
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.
  #5  
Old 20-May-2004, 14:13
calculus87's Avatar
calculus87 calculus87 is offline
Junior Member
 
Join Date: Sep 2003
Location: FLorida
Posts: 41
calculus87 is on a distinguished road

Another Question


I do have a small question for you. Your first link showed me how to change data in a database with VC++ GUI. I understand this much better, but the site did not talk about making an Access DB or how to create Tables in an Access DB, or in the tables how to create columns. These are all things that I will be doing through VC++. You have already helped me a great deal and I thank you. If you have any other links that might talk about one of the other areas which I mentioned could you please share. Thanks again.
__________________
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.
 
 

Recent GIDBlogVista ?Widgets? on Windows XP by LocalTech

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
Text Doc to Access DB calculus87 C++ Forum 18 21-May-2004 00:41
Scrolling Text Ads - Free advertising on other peoples sites jrobbio Advertising & Affiliates Forum 0 19-Feb-2003 00:00

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

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


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