I just join Codeguru. In the hope that It is Last option to try.
I am very new in VC++ 6.0. Before few day my head assign me task of implementing a printHeader module. Which I have to add into already implemented project in vc++ 6.0 before 6 or 7 years.
as I read MSDN,Ask question on many forum able to implement some what like adding data to access database.
My task is:
1] Older Project is a software which take a readings and generate Report according to it. (I do not have have to deal with it).
2] But at the time of print first printHeader is write on document then Reading are write on document.
3]Report is generated as per the companies to whom the required. Header contain Some entry from which some are constant and some have to change.
i)Company Name ii)Address iii)Order number iv)ModelNumber v)Tel no vi)Logo (logo of company- picture control(bitmap))
4]My task is to implement
i)Configure PrintHeader.Means if new company came then All above entries are store in access database.
ii)On other Dialogbox Only name of company shown in Listbox or Dropdown box. When user select particular company name then automatically entry with that company name retrieve and write into the document in Header at fixed location.
*Old Project does not used databased in it.
*Project in vc++ 6.0
*access database
Please Help. if some one implement it then I am very thank full to him/her.
There is no any "universal" code for all the databases.
However, you could look at some articles describing zhe using of these two classes to work with MS Access database. For instance: http://www.codeproject.com/Articles/...-Access-databa
I am asking because up till what ever I search I found that we first select Single/Mutiple document then Database support n all Means we do all setting related to database and application at the time of creation only... So I don't know how to connect database with my project.
I never added Database support to my projects. I always wrote code to access databases from scratch.
You could connect database the same way as it was done in the codeproject example.
In my old project I write on document directly. For that class there is no Dialogbox. To store the data return by sql query we used Listbox control here. So please tell me how to access this data into that class to write on document for printpreview. Shoud I post that class code here.
connect to a database?
or access database data?
or just print / preview data in a listbox?
I have one class which contain Onprint function this class don't have any dialogbox associated with it.
so where should
1]I write connection string?
2]where to I fired Select query?
Here I just want to replace those Hard coded value by variable which will be read from access database.
A mistake that many folks make when learning a new technology is they try to add the new technology into their project from the start. I say it's a mistake because often they don't understand the new technology and end up with a bunch of trial and error code in their app.
Given that, why don't you create a small test project that uses MFC to connect to the Access db? Then, once you figure out how to query (or write to) the database, you bring over the relevant code into the real project.
It might seem like this approach would take longer, but in reality it usually takes less time because you can separate the learning of the technology from the rest of your app easier and are able to bring over only the code you need.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.