|
Hi ,I am trying to connect to an Access DB created using Access 2000.I am using VC6SP5.I keep on getting the CDaoException "Unrecognised Database Format".Even when trying to create a class out of class wizard , i get the same error.I have MDAC2.6 + Jet drivers installed.Am i doing something wrong???What do i need to do to make it work??
Thanks for your help.
|
|
|
|
|
Visual C++ Wizard don't support Access 2000 database, but anyway you can access it from a Visual C++ app.
Add this code
CMyApp::InitInstance()
{
AfxGetModuleState()->m_dwVersion = 0x0601;
// ....... your needs
}
If you to create an Access 2000 Database
CDaoDatabase db;
db.Create("NewDatabase.mdb",dbLangGeneral,0x40); // 0x40 DB Version
For additional information, please see the following article in the Microsoft Knowledge Base:
236991 PRB: Unrecognized Database Format Error with Access 2000 Database
|
|
|
|
|
I have been building alot of 'Explorer' like apps lately in MFC. You know the type, TREEVIEW on the left and LISTVIEW on the right. Everytime he reviews what I have done, he sighs, and comments how great it would be to have the ability to move the border between the two controls (in an Explorer - esque) fashion.
Could some one point me in the direction of some MFC code to do this ?
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
I did something like that once by setting the cursor to an arrow in SetCursor if I was on the edge of the line, and simultaneously setting a bool to tell me if the user pressed the left button and started using the mouse I'd be repositioning controls. It's not hard to do, just call SetWindowPos or MoveWindow on the controls ( I like SetWindowPos because you can specify SWP_NOMOVE and just provide a size for the tree control ).
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I am developing in CE,
OnMouseMove doesn't seems to work doh!
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
|
The MFC AppWizard can make an Explorer-style app, with two views in a splitter. You might want to make a dummy project with that wizard to see how it's done.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
HRESULT hr=ADsGetObject(L"WinNT://chenway",
IID_IADsContainer,
(void**)&pSchema);
LPOLESTR szBuffer = new OLECHAR[MAX_PATH*2];
wcscpy(szBuffer,L"cn=");
wcscat(szBuffer,L"TestAttrName");
if (!pSchema)
return E_POINTER;
hr = pSchema->Create(L"attributeSchema",szBuffer,&pDisp);
the pDisp pointer is returned NULL?why?
I want to add the user class a new attribute.
|
|
|
|
|
Hi, all!!!
==========
I want to create my own DataBase.
new and improved DataBase,
fast and efficient DataBase,
source free Data Base...
But I have a little tiny problem:
I don't know where to begin
please help
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
You could start with lookin at MySQL or PostgresSQL. Parictually MySQL its a widely used freee database implementation.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
|
Hi,
Iam getting problem with converting CString into Char* and vise versa.
If anyone helps me in this thanks for their help.
Regards
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
<br />
CString str("Some string");<br />
char* chr = (char*)(const char*)str;<br />
I vote pro drink
|
|
|
|
|
That will break if the contents of str are modified. GetBuffer() is the right way to get a non-const pointer to the string.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
You can create a CString from a char*, and to go back do this
CString s;
s.GetBuffer(s.GetLength()+1);
s.ReleaseBuffer();
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Also, if you just need to pass a const char* to a CRT/WinAPI function, you can use
CString s = "a string";
CallMyCharFunction((LPCTSTR)s);
But if you really need a char* , use the methods above.
CodeGuy
The WTL newsgroup: 910 members and growing ... http://groups.yahoo.com/group/wtl
|
|
|
|
|
strcpy(szstr, str.GetBuffer()); //where str is a CString and szstr is a char*
Cheers!!!
Carlos Antollini.
|
|
|
|
|
I face some problem regarding the deadlock issues.
I am implementing a dining philosopher simulator and try to compare various algorithms. Some algorithm will cause deadlock as I expected.
However, is there any ways that I can explicitly release the thread from the deadlock (ie: like click on a "release philosopher from deadlock" button) after I am happy enough to see what deadlick look like.
One of my solution is using
WaitForSingleObject(chopstick_monitor, SOME_LONG_TIME);
instead of
WaitForSingleObject(chopstick_monitor, INFINITE);
However, is there any better way so that the philosopher will always remains at the deadlock state unless I command them to recover from deadlock.
thank you. if possible, pls e-mail the solution to yccheok@yahoo.com
regards
yccheok
|
|
|
|
|
Have your philosophers wait for two events instead of one, and use the second to signal deadlock recovering:
HANDLE handles[2]={chopstick_monitor,deadlock_recover};
switch(WaitForMultipleObjects(2,handles,FALSE,INFINITE)){
case WAIT_OBJECT_0:
...
break;
case WAIT_OBJECT_0+1:
...
break;
...
} Better yet, have one deadlock recovering event for each philosopher so that you can control them individually.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
The question and topic I want to ask is...
How can I interface my VC++ application with a VB application so that I can pass data between the two?
I have looked at some concepts like DLLs, COM, COM+, DCOM, ATL, ... but all text that I skimmed at the local bookstore have left me puzzled and said a lot without saying anything.
Specifically, I have a list class in my VC++ application that contains a linked list of data elements. I want to be able to pass this to my VB application so that I can do work on this data in VB (display, manipulate, "rewrite the list"). While in VB application, I will probably work with the data in an array structure. Then, send a modified version of the data back to my VC++ application so that it can work with the data as if it were in its original state (linked list with new links.)
Could someone please point me to what I should read/study or the topic under which this interfacing falls under? Thanks for the answers and guidence in advance.
Johnny
|
|
|
|
|
I've worked a lot with VB - VC coupling, and I found two good ways to interoperate:
1) Make a COM bridge for every C++ class you want to use from VB. You can do it pretty nice with ATL, but of course, you can use "bare bone" COM, if you wish.
2) For every C++ class, make a corresponding VB class, and make a DLL that will "glue" them. In every VB class you will have a long private member that will hold the memory address of the corresponding C++ class.
If I were you, I would take the first route, although the second one also works fine.
I vote pro drink
|
|
|
|
|
I don't know anything about VB, and I don't know what versions of Windows you need to support.
But, I have made a lot of communication between programs using Named Pipes.
The "server" (listening) application needs Windows NT/2000/XP, so I don't know if you can use that...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I can trade help if you like..
I can solve this for you if you can solve my question
email me if you are interested
|
|
|
|
|
Hi fellas!
I have a technical questiom:
Does Windows NT 4 support SSE instructions? and if it originally does not from which SoftWare pack it supports SSE instructions.
Thanks in Advance
Damon
|
|
|
|
|
I'm having a very bizarre problem with a Visual C++ program I'm working on. The program seems to crash with an access violation when one of 3 certain string variables are accessed. I know it's 3 because for some reason switching the order of the variable declaration seems to switch the crash to one of the other 2 variables. I have no idea why this is happening or what do do about it. It just started all of the sudden in a part of the code I hadn't even changed. It only happens in Debug mode, only on my machine, and only with this project(I've never seen this before in any other project). I've since upgraded my RAM by 128MBs and reinstalled Visual C++ 6. This didn't fix the problem. Has anyone else ever encountered this before? How did you fix it?
Why not throw away a dime,
I throw away ten pennies all the time...
|
|
|
|