|
The following code works with DAO 3.5, but it doesn't when I add the following line into InitInstance():
<br />
AfxGetModuleState()->m_dwVersion = 0x0601;<br />
....<br />
<br />
CDaoDatabase db;<br />
db.Create("c:\\test.mdb");<br />
<br />
CDaoTableDef td(&db);<br />
<br />
td.Create("test link");<br />
td.SetConnect("dBase IV;Database=C:\\");<br />
<br />
td.SetSourceTableName("test.ddf");<br />
<br />
td.Append();<br />
The error message is "The Microsoft Jet database engine could not find the object 'test'. Make sure the object exists and that you spell its name and the path name correctly."
I've tried using "test#ddf" as a vaguely remember reading that this is the key to getting non standard extensions accepted, but this makes no difference in Jet 3.5 or 3.6 (i.e. 3.5 still works , 3.6 doesn't work
Any ideas?
|
|
|
|
|
MFC 6.0 has the ability to use Microsoft Access 2000 databases. To engage this support in your application you use.
AfxGetModuleState()->m_dwVersion = 0x0601;
So to use under DAO 3.5 just remove the line
Hmm...
|
|
|
|
|
but the whole point is that I want to use DAO 3.6
|
|
|
|
|
Hi all...
I've got a problem that arose after moving the resources in our application to an external resource dll for localization. All that works fine, but now the ClassWizard is basically unusable for adding new members based on controls in the dialogs. I know it's got something to do with the fact that all the control and dialog definitions are not part of my main app's project anymore... but..
does anyone know how to fix this?
Thanks in advance,
Andrew Welch
|
|
|
|
|
I don't know how to fix this ClassWizard issue. Any chance for storing main language resources (probably English) in .exe - this solves the problem completely. In this scenario, satellite dlls are needed only for secondary languages.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
I think that is part of the solution.. However, we have separate english, italian, german, spanish and french dll's. Keeping the english resources embedded in the app really isn't feasible because we have some pretty big resources. Keeping them separate reduces the size of the install by about half.
I'm going to try something in the app's resource file (which is basically empty and static now ) using
#ifdef APSTUDIO_INVOKED
#endif
and see if I can't get the symbols I need loaded when editing only.
Thanks
|
|
|
|
|
Hi All,
I need to create a timer that would start once I start running a process from within my program.I need to know how much time it takes for the process to create the first output.For this I would need a timer.I case the timer value reaches a specified limit the process should be terminated.
What is the method I can do this.
Can anybody help me?
Thanks and regards,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
WaitForSingleObject with a timeout period should work for you.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
There are several solutions. You could get the system time exactly before you the process begins and then get the system time exactly after the first output. Their difference is the duration time.
Kuphryn
|
|
|
|
|
I am receiving some configuration setting via a XML document. One of the entry is the caption of a column header. The caption is given using a string ID (IDS_COL1_CAPTION) when extracting this info from the XML document the resulting value is a string containing “IDS_COL1_CAPTION”.
Is there a way to convert this text string ID into a numeric ID to be able to use the LoadString function of CString?
Thank you
|
|
|
|
|
nope. there's no automatic way to do it. you'll have to set up a mapping of strings to numerics. i would use a std::map.
-c
Democracy is the worst form of government except all those other
forms that have been tried from time to time.
-- Winston Churchill
|
|
|
|
|
I don't think so - if IDS_COL1_CAPTION is resource identifier. When you build exe/dll, the #defines are expanded to constant integers, there's no 'IDS_COL1_CAPTION' literal in executable.
You'd have to provide your own mapping from strings to integers.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Thank you.
This is what I was also thinking.
|
|
|
|
|
Hi, i'm currently planning to write a programm which allows the user to generate own dialogs to use defined functions.
I came around by letting the user add/modify dll-dialog resources.
I know ther are some resource editors out ther by whick you can edit the resources of existing (compiled) exe/dll files. (e.g. reshacker, restuner, PE Explorer,...)(Its also possible with VStudio, I know.)
There is an MSDN SDK sample called "DlgEdit" but with this you can only modify ".res" files...
BUT I dunnot want the USER to have VStudio installed to create his own dialogs.
So i thought about writing my own resource editor.
So does anyone now to help me in that problem??
I need to know where th resources are located in the exe/dll and how to "decompile" them and then paste back to the exe/dll again and the store the exe/dll.
help would be greatly welcome, as I'm not a master VC++ coder up to now
Greetingz from da HackMan
|
|
|
|
|
Search for DLGTEMPLATE and DLGTEMPLATEEX in MSDN.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Ah, looks good, but how to use it??
Greetingz from da HackMan
|
|
|
|
|
A list of things to check: LoadLibrary[Ex], FindResource, LoadResource, DialogBoxIndirect, CreateDialogIndirect, UpdateResource.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Hi!
Does anyone know how to paint each character in a CListCtrl in a different color? (Not just chaning complete text or line color, I know how to do that already)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
you will have to do this as an owner-drawn control . ie. you'll have to handling all the rendering of the cells yourself.
-c
Democracy is the worst form of government except all those other
forms that have been tried from time to time.
-- Winston Churchill
|
|
|
|
|
I feared that....could you give me a hint where I should start?
Which function should I override? Do you have any useful links?
thanks
modified 12-Sep-18 21:01pm.
|
|
|
|
|
there are some articles on www.codeguru.com that describe it (here's one: http://www.codeguru.com/listview/sel_row.shtml). it's not too bad.
-c
Democracy is the worst form of government except all those other
forms that have been tried from time to time.
-- Winston Churchill
|
|
|
|
|
Hi,
I have my Visual C++ 6.0 application that uses DAO and Microsoft Access (Trial.exe & Trial.mdb)! I would like to give that application and mdb to my friend to try, but he does not have Visual C++ & MicroSoft Access!
However I do have:
- Vbrun60.exe
- DaoRedis.exe (& its Setup.exe)
Can some one tell me in detail, what I need to do in other to include all neccessary files in my CD & give it to my friend?
Thank you for all help!
|
|
|
|
|
You need to install MSJet db engine.
You can install MDAC + MSJet engine (MSJet not included in MDAC >= 2.5)
See http://www.microsoft.com/data/ for MDAC and Jet files.
Pavel
Sonork 100.15206
|
|
|
|
|
Hi Pavel,
Thank you very much for your help, but I have 2 un-cleared instructions:
1) In the website they did not mention about DAO (only ADO, OBDC & OLE DB), is that OK for DAO too?
2) Who will do the download: me or my friend who does not have Visual C++ & MS Access?
*) If it is me to do that then how I put files to my CD (for giving it to my friend), I will include Trial.exe, Trial.mdb & all download files?
Many thanks & hope you give me a bit more info!
|
|
|
|
|
1) DAO is a native interface of MS Jet database engine, so if You have MSJet installed, you can use DAO (MS Jet is database engine for MDB file format, Access is an app build over it like that one of yours.)
2) Files to download are MDAC in version and language of your selection (I'm using 2.6 right now, 2.7 is newest, I had no reason to download it) - one exe file setup and Microsoft Jet 4.0 Service Pack 3 - also one exe file setup where you can choose the language.
Pavel
Sonork 100.15206
|
|
|
|