|
I`m creating an application which uses MSAccess. The application is written and with VC 6.0/SP5 and DAO-SDK 3.6.
When creating the database with MSAccess 95 everything works fine.
When creating the database with MSAccess2K I get the message that this is not a valid database. I also get this message, when I convert the working '95 database to 2K.
I assume, that I have to alter the header files or the alike (and recompile the whole library), to get the application working with MSAccess2K.
I remember having read about this elsewhere in the internet, but cannot remember the location.
Can someone help me. Either by telling me, where to find the information, or providing some hints, what to do?
Regards
G. Steudtel
|
|
|
|
|
Use the following line before using any database routines:
AfxGetModuleState()->m_dwVersion = 0x601;
Once this is called, you should be able to open a MSAccess 2000 version database.
Joel Lucsy
|
|
|
|
|
Hello all
I'm developing an application which uses serial port. I want to code this application in such a way that if any other application is already using the serial port, I want to stop the other application before my application can proceed.
So I would like to know if there's any way of retrieving info reg processes using serial port. If any one knows how to do it please help me.
Thanks for your time
Hari.
|
|
|
|
|
Since the only way to open a serial port using CreateFile() is in exclusive mode, if another app has the serial port open, you won't be able to open it.
Basically, if the serial port exists but you can't open it, then another app has it open.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello Ryan
Thanks for the reply. Using CreateFile() in exclusive mode we can determine whether serial port is already opened or not, But Is there any way of knowing which process is using that serial port and way of getting handle to that process so that we can terminate that process using ExitProcess().
Thanks for your time.
Hari.
|
|
|
|
|
Wouldn't it be rather rude?, besides, it may be a driver that uses the port. I don't know if it is possible to stop a driver on the fly, but i bet the user wouldn't be amused if her mouse suddenly stopped functioning.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Like Jan said, users don't like programs that do that. You'd be better off simply displaying a box that tells them to close the program using the serial port and then either continue or exit. If they continue, check again, and keep displaying this box until either they do close the program, or they choose to exit.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello Ryan
thanks for the reply. In my case I've a hotsync manager running in the systray. The only time it uses serial port is while doing hotsync. Assume that the user enabled serial port for this hotsync manager but not using it. So I thought it would be better if I can stop this hotsync momentarily so that my application can use serial port and restart the hotsync once my app is done using serial port.
Thanks
Hari.
|
|
|
|
|
haritadala wrote:
So I thought it would be better if I can stop this hotsync momentarily so that my application can use serial port and restart the hotsync once my app is done using serial port.
You could do, but I wouldn't recommend it. Some users would like a program to do this, but almost all wouldn't. Most user's prefer to have control over what is done on their computer.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
, My manager want's me to put this feature in the application I'm developing. Somehow I need to put this feature.
Anyway thanks for your time for answering my questions.
Hari.
|
|
|
|
|
haritadala wrote:
My manager want's me to put this feature in the application I'm developing.
OK. Sorry, I can't help with it There is a way to do it (there are apps to do it - see Process Explorer from www.sysinternals.com[^]), but I don't know how it's done.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
If you are adding C files to CPP project you may consider adding:
extern "C"
{
}
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
Post some of the errors so we can see what they are (the first and last 5 at least).
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
My app has a bunch of menu items in which I would like to bring up different windows. One of the windows has an option that when checked and "ok" is hit will bring up another window. This (2nd)window also has its own menu selection that will bring it up.
My problem is that if i display the (2nd) window and then bring up the other (1st) window that allows me to check if i want to see the information and hit "ok", it creates the same exact window. How can I get it to check if there is a window already open and just set focus to it? I am currently using this code:
if (m_pStats== NULL)
{
m_pStats= new CStats;
if (m_pStats->Create(IDD_STATS) == TRUE)
m_pStats->ShowWindow(SW_SHOW);
}
else
m_pStats->SetActiveWindow();
Can someone walk me through this and help me with this. I am extremely new to programming and would like to figure this out ASAP!
THANKS IN ADVANCE!
|
|
|
|
|
hi,
can anybody tell me ,how to use MSDE with MFC applications.
Any help will be highly appreciated.
Thanks and regards.
|
|
|
|
|
That is Microsoft's Data Engine. Which particular database are you interested in working with (e.g., Access, SQL, FoxPro)?
|
|
|
|
|
Connect and access it just as you would SQL Server. The only real difference is the number of concurrent connections it supports, resource usage limits and the fact that it does not come with the SQL tools (EM, Query analyzer, etc.).
onwards and upwards...
|
|
|
|
|
Hi,
I'm quite new to programming in MFC,
Can you tell me how to add a Button (I think CButton-like), to an empty form and add some functionality (an eventahndler)?
|
|
|
|
|
BoudewijnEctor wrote:
Can you tell me how to add a Button (I think CButton-like), to an empty form
Use the resource editor from within the IDE.
BoudewijnEctor wrote:
...and add some functionality (an eventahndler)?
Use ClassWizard.
|
|
|
|
|
XP icons with shadow does not draw properly. I'm using standard functions and can't understand what I do wrong.
|
|
|
|
|
|
I have been searching the web, doing a lot of reading. I see that C# and .NET are common. I see very little about VC++ and MFC. Yet the VC++ forum has the highest turnout it seems. Is it advisable for a beginner at programming to start with MFC or should I learn C# now. I was thinking I'd learn Windows programming with MFC, and then later move up to Visual Studio.net and C#. Am I thinking wrong?
Which brings up the next question, how does C# relate to Windows Programming. If VC++ uses C++, then what do you program C# with, Visual Sudio.net? Is C# drastically different than C++? If I learn C++, will C# be totally different. I know C# is more portable, but is it difficult to learn once you learn C++ well?
Ok, enough questions...I'd really appreciate any info on this, thanks, Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
I would recommend learning both C# and C++. C# is moving forward rapidly, and is being used both for applications and web design (ASP.NET). It is not radically different from C++, but more similar to Java. C++ will still be used for high-performance computing and applications that require speed, such as presentations, image/video processing, servers etc. Desktop applications are candidates for C#, but C++ will still be predominant for a while yet (that's my opinion anyway). MFC is not good (and never has been) but it will remain in use for a long time.
If you want a book to help with C#, "Inside C#" (2nd ed) by Tom Archer is brilliant.
I'm learning C# at the moment and I don't find it particularly difficult. I know C++ very well, so I can pick up C# reasonably quickly, but don't expect it to take a few days - it will take a decent amount of time.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan,
Can I do everything with C# that I can do with MFC? I'm a bit confused on this. If I'm correct (and please let me know if I'm not), C# is just a language like C++. MFC is something exclusive to Microsoft Windows (and is not a language). So what has replaced MFC if C# is just the language? What program do Microsoft programmers use now to develop their XP programs? Thanks.
|
|
|
|
|
Anonymous wrote:
If I'm correct (and please let me know if I'm not), C# is just a language like C++.
Yes, although they're a bit different. C++ is a compiled language and the executable file can be directly executed. C# is compiled to an intermediate code, similar to Java, which is then interpreted by the .NET runtime when the program is executed.
Anonymous wrote:
So what has replaced MFC if C# is just the language?
The .NET framework class libraries, although there is no document-view built in (well, not that I've found anyway ).
Anonymous wrote:
What program do Microsoft programmers use now to develop their XP programs?
Visual Studio.NET, although you can use SharpDevelop[^] for C# development, which is free. You'll have to download the .NET framework SDK in this case, though.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|