Thursday, March 27, 2008
odbc
Ok so I decided to switch to ODBC instead of DAO, as it seems to perform all the same functions, and it actually works. (Well, at least it doesn't give me any errors yet). So I'm just going to try that, and then we'll see. I also can't do much at home, because I don't have microsoft access there, and open office version can't create the mdb files that I need. Anyways, I think I'm getting closer to what I have planned.
Friday, March 21, 2008
Ufff... all that software!
Finally I got to the most interesting part of my program - connecting the c++ program body with the database I have. I found a lot of tutorials on that topic online, especially on microsoft msdn website. Well, as I decided to use mfc in my program (I don't want to code everything by hand), I tried to link the database and my program statically through the mfc wizard. When I tried that I ran into "Unrecognized database format". At first I thought that was because I didn't have Microsoft Access on my computer. So I installed special dao dll libraries. That didn't really work. Then I tried to install free trial of Access, but that didn't help either. Finally, different online programming forums told me to update my MFC library from Jet 3.4 to Jet 4, which I couldn't find for free anywhere. So I found the Visual Studio Service Pack 5. It says in the description that they updated the mfc in there. It takes pretty long time to install this whole thing. So, the software problems took me way more time than actual coding. I'm filling my database with the units I have for now, while the pack is installing. I really hope it will work.
Monday, March 17, 2008
research
Ok, so now I am reading the "Access Database" book (Thanks, Richard!). The book's really good. It explains all the basics of databases and their structure and how they work. It's pretty understandable, although there is a lot of terms in there. I'm hoping to finish the book as soon as possible and start working on the project. I'm going to make some sample easy databases on the way, just to get it better, and I will probably do them in Access for now. I'll figure it out about the software later.
Thursday, March 13, 2008
The Database
So I started learning all the basics of bulding and transferring data from databases. I decided to use Microsoft Access to build the database, because it's going to be pretty simple. In the program I am going to use DAO library, because that's the one that can read data from Microsoft Access files.
Following the advice of online tutorials, at first I figured out how exactly I wanted the database to work. I split the whole list of units into categories, in each category would be a 2d table, where I would paste the numbers, needed to convert from any unit to any other unit. Basically I would have the same list of units on the horizontal menu and the vertical menu. On their intersections I would put the numbers, by which I need to multiply the horizontal unit to get the vertical one.
I don't have access to any programming or database software right now, so I started just researching and going through tutorials on databases. I found a very good website with different units. Oh my god! I never thought there were so many different crazy units in the world and someone actually wrote them down! This is unbelievable! And that is only from one source! There are only 272 different units - that's just for length! How would I do that without a database?
Another thing is, the same unit in different areas is different. Like the US mile would be totally different from the Scottish mile and so on. At first I thought just to write the region in parenthesis, but then I had an idea, what if I could categorize the units not only by the measurement, but by the area, too. I'm not sure how I'm going to do that yet, I guess I'll figure it out when I get to actually building the database.
Anyways, I found out, that my program might not be as small as I thought, I have many ideas of updating it. I need to build the basics at first :)
Following the advice of online tutorials, at first I figured out how exactly I wanted the database to work. I split the whole list of units into categories, in each category would be a 2d table, where I would paste the numbers, needed to convert from any unit to any other unit. Basically I would have the same list of units on the horizontal menu and the vertical menu. On their intersections I would put the numbers, by which I need to multiply the horizontal unit to get the vertical one.
I don't have access to any programming or database software right now, so I started just researching and going through tutorials on databases. I found a very good website with different units. Oh my god! I never thought there were so many different crazy units in the world and someone actually wrote them down! This is unbelievable! And that is only from one source! There are only 272 different units - that's just for length! How would I do that without a database?
Another thing is, the same unit in different areas is different. Like the US mile would be totally different from the Scottish mile and so on. At first I thought just to write the region in parenthesis, but then I had an idea, what if I could categorize the units not only by the measurement, but by the area, too. I'm not sure how I'm going to do that yet, I guess I'll figure it out when I get to actually building the database.
Anyways, I found out, that my program might not be as small as I thought, I have many ideas of updating it. I need to build the basics at first :)
Subscribe to:
Posts (Atom)