|
Use ADO it is faster.
And yes, you can keep the database table opened... when you need it. If you have 20-30 computers and each of them makes queries every 5 seconds... your database server will die (I mean will work slow). Yes this is tested, on Pentium III 800, dual processor, with MS Windows Database Server OS and SQLServer 7.0 (2000 was much faster though). The speed I mean, when you really need speed, close to Real time. Of course you won't do this when you have GUI in your application, that means that the speed is depends on user
So use ADO it is faster than ODBC
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
And which Database shall i use ? What about MySql ? Is that compatible with vc++ ???
regards
Sonu
|
|
|
|
|
sonu wrote:
What about MySql ? Is that compatible with vc++ ???
What do you mean compatible? ODBC/ADO etc. make things transparent so that as long as you have the right driver it doesnt matter what DB you are connecting to. Just get MyODBC or some such library and get going. Postgres also has an ODBC library
Nish
p.s. from a cafe. so am not logged in.
|
|
|
|
|
If you do choose MySQL, they have a C++ API available for custom programming. It's called MySQL++, and you can download it from their website.
Jon Sagara
"There are lies, damned lies and statistics."
-- Mark Twain.
|
|
|
|
|
Philip Patrick wrote:
So use ADO it is faster than ODBC
I don't think so. The best performance is with direct calls to db API, ODBC is a layer on the top of it, and ADO includes COM. AFAIK, ODBC is faster than ADO, and there are some pretty good ODBC wrapper classes, which can make your life much easier.
I vote pro drink
|
|
|
|
|
That's right, ODBC has CRecordset , CDatabase classes in MFC that is easy to use, but ODBC is an old technology - first, and second, we tested ADO and ODBC perfomance in the company I worked... and ADO was much faster. So I'm not guessing, I'm pretty sure ADO is faster than ODBC
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Philip Patrick wrote:
That's right, ODBC has CRecordset, CDatabase classes in MFC that is easy to use
Actually, I had in mind OTL or DTL. They are very fast.
Philip Patrick wrote:
we tested ADO and ODBC perfomance in the company I worked... and ADO was much faster
With what database did you test it?
I vote pro drink
|
|
|
|
|
Well... we worked with MFC database classes, so have no idea about perfomance of other libraries.
Tested with MS SQL Server 7.0 and 2000 (the last was much faster ) on Pentium III 800 dual processor with MS Windows 2000 Database Server
lol
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Philip Patrick wrote:
Tested with MS SQL Server 7.0 and 2000
Well, that explains it. MS databases have very good OLEDB drivers, but with MySQL I'm pretty sure ODBC would outperform ADO.
I vote pro drink
|
|
|
|
|
Well, if you say so I can't say nothing about MySQL, but MSSQL was the best of other big non-free databases, like Oracle for example
But if you say that MySQL is better with ODBC, I can only listen and take in mind, lmao
Waiter, one for Nemanja, please
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Philip Patrick wrote:
Waiter, one for Nemanja, please
LOL, cheers!
I vote pro drink
|
|
|
|
|
Hi,
How can I know the margins for the printer ? ( and it´s too much size that ?).
Thanks, Bye !
Braulio
|
|
|
|
|
There's an MSDN article that might be helpful - "HOWTO: How to Use a Program to Calculate Print Margins" - looks like you need to use GetDeviceCaps with PHYSICALOFFSETX and PHYSICALOFFSETY . There's some other stuff here as well.
|
|
|
|
|
Can anyone help me please?
How to call an ocx control(designed in vb) in
a vc++ programme?
|
|
|
|
|
Make sure that your OCX is registered.
In the VC++ IDE, with your project loaded, goto Project->Add to Project->Components and Controls. Select Registered ActiveX Controls. Find your control and click Insert. The IDE will make a class to wrap your control. Use this class to create an instance and then call into the methods.
|
|
|
|
|
I am currently working on a project dealing with Client and Server program using API Socket. There are no problems for sending and receiving messages although I always get unknown error when the program ends.....
Is there any possibility for built-in class in Visual Studio to be a problem?? cuz i am using fflush.c which is included in Microsoft Visual Studio\VC98\CRT\SRC\fflush.c !!!!!
Below is my code and please see closely 14 th line.
/***
*fflush.c - flush a stream buffer
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines fflush() - flush the buffer on a stream
* _flushall() - flush all stream buffers
*
*******************************************************************************/
1 static int __cdecl flsall (
2 int flushflag
3 )
4 {
5 REG1 int i;
6 int count = 0;
7 int errcode = 0;8
9
10 _mlock(_IOB_SCAN_LOCK);
11
12 for ( i = 0 ; i < _nstream ; i++ ) {
13
14 if ( (__piob != NULL) && (inuse((FILE *)__piob)) ) {
15
16 #if def _MT
/*
* lock the stream. this is not done until testing
* the stream is in use to avoid unnecessarily creating
* a lock for every stream. the price is having to
* retest the stream after the lock has been asserted.
*/
_lock_str2(i, __piob);
-------------------------------------------------------------------------------------------
line 14 error
First-chance exception in Step2Client.exe: 0xC0000005: Access Violation.
__piob 0x00000000
_nstream 512
i 0
|
|
|
|
|
i am a beginner in programming,and i am learning c++;
today i find the following lines ,i dont know the syntax like this :
static _Interface* GetInterfacePtr() throw()
{
return NULL;
}
anybody waste some time to help me?
thanks in advance
|
|
|
|
|
|
i dont understand the " throw() ",does it break the definition of the function GetInterfacePtr()?
thanks
|
|
|
|
|
|
then if it is "throw (type)" ,what is the meaning ?
would you please tell me where i can find the explanation of the syntax ?
thanks
|
|
|
|
|
It would mean that the function may throw only exceptions of class "type". Look up "exception specification" in some proper C++ reference. Exception specifications aren't supported by VC++6.
|
|
|
|
|
markkuk wrote:
Exception specifications aren't supported by VC++6.
You sure about that? The first hit in MSDN when searching for "exception specification" shows examples of VC code using exception specifications.
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Michael may be this gauy is confused for the following:
Microsoft Specific —>
Microsoft C++ does not support the function exception specification mechanism, as described in section 15.4 of the ANSI C++ draft.
I found that in the MSDN under Exception Handling Syntax It's a little confuss butc don't said that VC doesn't support Exception specifications...
Reagards...
Today is Friday!!! and Party!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
If you declare something like:
void SampleFunction(void) throw (int)
{
}
and compile, you will get
warning C4290: C++ Exception Specification ignored
I vote pro drink
|
|
|
|