|
I am looking to design a database using C++ in the near future and am needing some reference or opinions on where to start. The trick to this database is that it is solely ran off of excel spreadsheets. I want to populate my database using a preexisting excel spreadsheet, edit the information I want through the database, and then save the updated data back to that location or to a new location.
I'm looking to link this to using bar code scanning and capturing data so it updates the database that way. The scanning is very basic, a matter of scanning a bar code and the database putting a Y or N in a related column depending on the number scanned.
I have also thought about doing this web based using PHP, but like I said i'm needing some opinions or reference points on the web to look at for some examples. This will not be a very detailed database, probably up to 10 columns max and at the most 10k line items.
Thanks in advance
|
|
|
|
|
Waldman wrote: using bar code scanning
Waldman wrote: I have also thought about doing this web based
So the user scans bar codes using a browser?
led mike
|
|
|
|
|
The tenative plan is to scan all the numbers that attend a certain event and have them store into a separate excel spreadsheet, and then synch it with the big spreadsheet. The numbers that are scanned on the separate spreadsheet will be searched in the larger spreadsheet and then the appropriate column marked accordingly.
Sorry I was a little vague on that part. The main concern is having a functional database from an excel spreadsheet. I can implement the scanning part into it later or do it on the side for the time being.
|
|
|
|
|
You could always use the Excel C API and write the whole thing inside Excel. Here is a codeproject article that demonstrates a type of database inside Excel, using the C API: Click[^]
onwards and upwards...
|
|
|
|
|
You might look into using Access instead of Excel. The reason I say that is that Excel uses Access as its backend (it is just a special case of a general database). You can use ADO, OleDB, etc with either, but Access would give you a little more flexibility with formatting your tables (and make it easier to move to SQL Server down the road if need be) while still allowing you to easily produce a spreadsheet.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I have considered using Access also, the only problem is that i'm trying to avoid using any SQL server. I am doing this for my office and a lot of our end users are volunteers that use Excel spreadsheets, so i'm trying to keep this as simple as possible for their sake. And in the event that I get a different job after graduation, i'll need something that my replacement will be able to understand.
Basically after the database reads in a spreadsheet, does whatever the user wants to do, and then saves it. I do not need a recorded record elsewhere of this spreadsheet. It's just a constant open/edit/close feature that the volunteers can handle since most of our spreadsheets are pretty massive with a lot of information that doesn't pertain to what they are doing.
|
|
|
|
|
Waldman wrote: I have considered using Access also, the only problem is that i'm trying to avoid using any SQL server.
Understood. You don't have to use SQL Server (as it is a multiuser DBM), but you can use ADO or OleDB to interface with whatever DB you use. Like I said, Excel is nothing more than a special case of an Access Database (which is nothing more than a slimmed down version of SQL Server). Your code will be much easier to understand if you write it to use DB queries than if you used Excel's automation API to do cell gets/sets.
Waldman wrote: Basically after the database reads in a spreadsheet, does whatever the user wants to do, and then saves it. I do not need a recorded record elsewhere of this spreadsheet. It's just a constant open/edit/close feature that the volunteers can handle since most of our spreadsheets are pretty massive with a lot of information that doesn't pertain to what they are doing.
Just use ADO and open the spreadsheet directly then. Create objects for your specific queries that each return the data that would be needed for a given task and allow them to be both retrieved and written. I believe there is an example of this in MSDN.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I appreciate all the input on this so far. This is ideally what I would like to do, but if anyone has any other suggestions whether it be a different program or even a different language please let me know.
I'll try searching the MSDN for something about this.
Also, do you think it would be easiest to use VB for the GUI of the database or is there a decent article on how to make one using C++
|
|
|
|
|
Waldman wrote: Also, do you think it would be easiest to use VB for the GUI of the database or is there a decent article on how to make one using C++
Doing Database programming in VB is almost brainless (that is, a 1st year programmer can look at the code and understand what is going on ... mainly because Microsoft made a whole bunch of assumptions about what you will want to do and doesn't let you do some of the nifty tricks). Database programming in C++ is far more complex. The GUI portion shouldn't matter too much, but the back end (where you plan to actually talk to the database) will be very different in terms of complexity between the two languages. It all depends on what your goals for the project are.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi,
Does anyone have any idea about the message with value 0x00AE that we receive in XP? I received this message only if I use the Appearance as "XP style" in Display properties under the tab "Appearance".
I was doing a paint in caption area (the place where Min, Max buttons are displayed) of an SDI, when I noticed that if I minimize and restore my application, the painting I did in caption area was getting overwritten with the default painting of the controls on the caption bar. I found that this undocumented message 0x00AE, caused this problem.
The same message 0x00AE, does not come in Classic style. Any idea on this?
Thank you,
AJ
|
|
|
|
|
I remember have the same problem a long while ago, though after looking through the same project file I cannot remember exactly how I handled it.
If memory serves, trapping the message has no effect. I think the trick was to trap all the NC* messages that would cause a repaint, and depending on what you are drawing, use a region to exlude the area you will draw to.
|
|
|
|
|
Thanks a lot for your reply.
The painting being overwritten is by a default message. How can I exclude a region from default painting?
Thanks,
AJ
|
|
|
|
|
hi all i had made dialog base application,it works fine when i click the enter button then application terminate i tried to handle it by adding function on key down event , is there any other alternate way to do it
and why it occur?
Tasleem Arif
|
|
|
|
|
You have to override the PreTranslateMessage handler. Something like the following:
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if ( pMsg->message == WM_KEYDOWN && ( pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_RETURN ) )
{
return 0;
}
return CDialog::PreTranslateMessage(pMsg);
}
Hope that helps...
|
|
|
|
|
|
|
tasleem143 wrote: when i click the enter button then application terminate i tried to handle it by adding function on key down event , is there any other alternate way to do it
Handle OnOk handller and remove default call to CDialog::OnOk()
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
thanks it works from when i want to exit the application i was calling OnOK(),now its not working bcos i had overwrited it,then another solution is use exitprocess or exit which i dont think is good aproach..
is there is any other function except those two or i had to use 1 of thenm.
Tasleem Arif
|
|
|
|
|
|
cpallini wrote:
You're welcome.
ok
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
tasleem143 wrote:
is there is any other function except those two or i had to use 1 of thenm.
PostQuitMessage() in case of Window and EndDialog() in case of dialog based application
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hi Guys
Just anyone got any code or design sample for web scrapper? I want to develop it to grab the information from websites.
thanks in advance
Pats
|
|
|
|
|
NitinPatil wrote: Just anyone got any code or design sample for web scrapper?
I do, but it's a VB Script file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi can you share the code ? or give me the idea how to do it? do you know how to build interactive web scrapper?
Thanks
Pats
|
|
|
|
|
NitinPatil wrote: Hi can you share the code ?
Here's one I used to get the current threat level:
Dim objIE
Set objIE = WScript.CreateObject("InternetExplorer.Application")
objIE.Navigate "http://www.whitehouse.gov/homeland/"
objIE.Visible = true
While objIE.Busy = true
Wend
Dim objTables
Set objTables = objIE.Document.all.tags("TABLE")
Dim objTable
Set objTable = objTables(12) ' get the 13th <TABLE> tag
Dim objRow
Set objRow = objTable.rows(0) ' get the 1st <TR> tag
Dim objCol
Set objCol = objRow.cells(0) ' get the 1st <TD> tag
Dim objImg
Set objImg = objCol.all(0) ' get the 1st <IMG> tag
MsgBox objImg.src The site has since been rearranged so the references are not accurate.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|