Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have text document in format like this:
shopping=2
dskjsg=3
sdfdbhs=96
fgshbsfb=45


i want two row in database, one containing name and other its value.
Posted
Comments
[no name] 21-May-14 7:43am    
http://msdn.microsoft.com/en-us/library/cc811599(v=office.12).aspx

read and parse the text document and create a SQL statement which will perform your needed actions.
 
Share this answer
 
Comments
Member 10834191 22-May-14 1:42am    
i m just a beginner for the c language.
can you help me with this??
not the whole code but what commands i use?
if possible..
Member 10834191 22-May-14 1:53am    
[NumericalParameters]
STONE_FILENAME=C:\Maya\HeliumLexus\final_planing_598.Mmd
STONE_ID=MASTER
STONE_WEIGHT4_CT=6.00000
STONE_WEIGHT2_CT=6.00
SOLUTION_QUANTITY=9
INCLUSION_QUANTITY=42
ROUGH_MODEL_TYPE_INT=0
ROUGH_MODEL_TYPE_STR=Unknown
ROUGH_WEIGHT2_TOTAL_CT=5.99
ROUGH_WEIGHT4_TOTAL_CT=5.9889
DIAMOND_WEIGHT2_TOTAL_CT=3.01
DIAMOND_WEIGHT4_TOTAL_CT=3.0205
DIAMOND_PRICE_TOTAL=27322.69
YIELD_TOTAL_PC=50.25
DIAMOND_QUANTITY=2
SAW_PLANE_QUANTITY=1
PIECE_QUANTITY=2
DIAMOND_PRICE_1=25526.15
DIAMOND_WEIGHT2_1=2.27
DIAMOND_WEIGHT4_1=2.2723
DIAMETER_MM_1=8.432
DIAMETER_MM_MAX_1=8.424
DIAMETER_RATIO_1=0.999
DIAMETER_MAX_MM_1=8.424
TOTAL_DEPTH_PC_1=61.39
TOTAL_DEPTH_MM_1=5.177
PAVILION_DEPTH_VALLEY_PC_1=44.56
PAVILION_DEPTH_VALLEY_MM_1=3.757
PAVILION_DEPTH_BEZEL_PC_1=43.68
PAVILION_DEPTH_BEZEL_MM_1=3.683
CROWN_HEIGHT_VALLEY_PC_1=14.55
CROWN_HEIGHT_VALLEY_MM_1=1.227
CROWN_HEIGHT_BEZEL_PC_1=13.73
CROWN_HEIGHT_BEZEL_MM_1=1.157
PAVILION_ANGLE_DEG_1=41.20
CROWN_ANGLE_DEG_1=33.80
TABLE_PC_1=58.99
TABLE_MM_1=4.974
DIAMOND_TABLE_TILT_1=110.59
DIAMOND_TABLE_DIST_TO_HOLDER_1=4.064
DIAMOND_NEXT_PART_WEIGHT4_1=1.6933
CULET_PC_1=0.20
CULET_MM_1=0.017
CULET_OFFSET_X_PC_1=0.10
CULET_OFFSET_Y_PC_1=0.10
CULET_OFFSET_AZIMUTH_1=45.00
CULET_OFFSET_RADIUS_PC_1=0.14
CULET_OFFSET_RADIUS_MM_1=0.012
GIRDLE_BEZEL_PC_1=3.98
GIRDLE_BEZEL_MM_1=0.336
GIRDLE_VALLEY_PC_1=2.28


TEXT FILE IS IN THIS FORMAT
KarstenK 22-May-14 2:01am    
What is the purpose of that? How many datasets you will have? If it are more likely 100 than millions I wouldnt create a db but parsing the data into an array.

Start here: http://it-ebooks.info/book/1498/

For a beginner you have a big task. :-O
Member 10834191 22-May-14 2:40am    
i have just posted a fraction of txt file
it is bigger having approx 30000 row
if possible
help
KarstenK 24-May-14 13:33pm    
In my understanding is a row a value of ONE dataset.

I hope you have 30000 different stones, with these parameters.
First of all, you have to implement a parser to parse the text file. Use Access ODBC Driver by including "sqlext.h".

Go to the page what Wes Aday mentioned. You should use "Direct ODBC Method". See the code under heading "Direct ODBC Example".

Note: The page claims that the method is only available for 32 bit Windows. Are you using 64 bit Windows Operating System? If you use 64 bit OS, you should switch over to C++ and use some alternatives like ADO.
 
Share this answer
 
Comments
Member 10834191 22-May-14 1:56am    
CAN YOU SEND ME LINK??
[no name] 22-May-14 2:10am    
http://msdn.microsoft.com/en-us/library/cc811599(v=office.12).aspx

This is the link Wes Aday mentioned. See in the comments below your questions.
In the page, see the fourth row of the table.
You may find this page useful:
http://www.easysoft.com/developer/languages/c/odbc_tutorial.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900