Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VC++ÖÐʹÓÃADO·½Ê½²Ù×÷ACCESSÊý¾Ý¿â

ת×Ô£ºhttp://dev.yesky.com/243/2230743.shtml
ADO(ActiveX Data Object)ÊÇMicrosoftÊý¾Ý¿âÓ¦ÓóÌÐò¿ª·¢µÄнӿڣ¬Êǽ¨Á¢ÔÚOLE DBÖ®Éϵĸ߲ãÊý¾Ý¿â·ÃÎʼ¼Êõ£¬¼´Ê¹Äã¶ÔOLE DB£¬COM²»Á˽âÒ²ÄÜÇáËɶԸ¶ADO,ÒòΪËü·Ç³£¼òµ¥Ò×Óã¬ÉõÖÁ±ÈÄãÒÔÍùËù½Ó´¥µÄODBC API¡¢DAO¡¢RDO¶¼ÒªÈÝÒ×ʹÓ㬲¢²»Ê§Áé»îÐÔ¡£±¾ÎÄÏêϸµØ½éÉÜÔÚVisual C++¿ª·¢»·¾³ÏÂÈçºÎʹÓÃADOÀ´½øÐÐÊý¾Ý¿âÓ¦ÓóÌÐò¿ª·¢£¬²¢¸ø³öʾÀý´úÂ롣ΪÁËʹ¶ÁÕßÅóÓѶ¼ÄܲâÊÔ±¾ÀýÌṩµÄ´úÂ룬ÎÒÃDzÉÓÃAccessÊý¾Ý¿â£¬Äú¿ÉÒÔÖ±½ÓÔÚÎÒÃÇÌṩµÄʾÀý´úÂëÖÐÕÒµ½Õâ¸ötest.mdb¡£³ÌÐò±àÒëÔËÐкóµÄЧ¹ûÈçͼһËùʾ£º
ͼһ¡¢ADO²Ù×÷ACESSÊý¾Ý¿âµÄ½çÃæЧ¹ûͼ
¡¡¡¡Ò»¡¢ÊµÏÖ·½·¨
¡¡¡¡ÍòÊ¿ªÍ·ÄÑ£¬ÈκÎÒ»ÖÖм¼Êõ¶ÔÓÚ³õѧÕßÀ´Ëµ×îÖØÒªµÄ»¹ÊÇ"ÈëÃÅ"£¬ÕÆÎÕÆäÒªµã¡£ÈÃÎÒÃÇÀ´¿´¿´ADOÊý¾Ý¿â¿ª·¢µÄ»ù±¾Á÷³Ì°É£¡ËüµÄ»ù±¾²½ÖèÈçÏ£º
¡¡¡¡£¨1£©³õʼ»¯COM¿â£¬ÒýÈëADO¿â¶¨ÒåÎļþ
¡¡¡¡£¨2£©ÓÃConnection¶ÔÏóÁ¬½ÓÊý¾Ý¿â
¡¡¡¡£¨3£©ÀûÓý¨Á¢ºÃµÄÁ¬½Ó£¬Í¨¹ýConnection¡¢Command¶ÔÏóÖ´ÐÐSQLÃüÁ»òÀûÓÃRecordset¶ÔÏóÈ¡µÃ½á¹û¼Ç¼¼¯½øÐвéѯ¡¢´¦Àí¡£
¡¡¡¡£¨4£©Ê¹ÓÃÍê±Ïºó¹Ø±ÕÁ¬½ÓÊͷŶÔÏó¡£
¡¡¡¡ÏÂÃæÎÒÃǽ«Ïêϸ½éÉÜÉÏÊö²½Öè²¢¸ø³öÏà¹Ø´úÂë¡£
¡¡¡¡1¡¢COM¿âµÄ³õʼ»¯
¡¡¡¡ÎÒÃÇ¿ÉÒÔʹÓÃAfxOleInit()À´³õʼ»¯COM¿â£¬ÕâÏ×÷ͨ³£ÔÚCWinApp::InitInstance()µÄÖØÔغ¯ÊýÖÐÍê³É£¬Çë¿´ÈçÏ´úÂë:
BOOL CADOTest1App::InitInstance()
{
¡¡AfxOleInit();
¡¡......
}
¡¡¡¡2¡¢ÓÃ#importÖ¸ÁîÒýÈëADOÀàÐÍ¿â
¡¡¡¡ÎªÁËÒýÈëADOÀàÐͿ⣬ÐèÒªÔÚÏîÄ¿µÄstdafx.hÎļþÖмÓÈëÈçÏÂÓï¾ä£º
#import "c:\program files\common files\system\ado\msado15.dll"
no_namespace rename("EOF","adoEOF")
¡¡¡¡ÕâÒ»Óï¾äÓкÎ×÷ÓÃÄØ£¿Æä×îÖÕ×÷ÓÃͬÎÒÃÇÒѾ­Ê®·ÖÊìϤµÄ#includeÀàËÆ£¬±àÒëµÄʱºòϵͳ»áΪÎÒÃÇÉú³Émsado15.tlh,ado15.tliÁ½¸öC++Í·ÎļþÀ´¶¨ÒåADO¿â¡£
¡¡¡¡ÐèÒª¶ÁÕßÅóÓÑ×¢ÒâµÄÊÇ£ºÄúµÄ¿ª·¢»·¾³ÖÐmsado15.dll²»Ò»¶¨ÔÚÕâ¸öĿ¼Ï£¬Ç밴ʵ¼ÊÇé¿öÐ޸ģ»ÔÚ±àÒëµÄʱºò¿ÉÄÜ»á³öÏÖÈçϾ¯¸æ£¬¶Ô´Ë΢ÈíÔÚMSDNÖÐ×÷ÁË˵Ã÷£¬²¢½¨ÒéÎÒÃDz»ÒªÀí»áÕâ¸ö¾¯¸æ£ºmsado15.tlh(405) : warning C4146: unary minus operator applied to unsigned type, result still unsigned¡£
¡¡¡¡3¡¢´´½¨Connection¶ÔÏó²¢Á¬½ÓÊý¾Ý¿â
¡¡¡¡ÎªÁËÊ×ÏÈÎÒÃÇÐèÒªÌí¼ÓÒ»¸öÖ¸ÏòConnection¶ÔÏóµÄÖ¸Õë_ConnectionPtr m_pConnection£¬ÏÂÃæµÄ´úÂëÑÝʾÁËÈçºÎ´´½¨Connection¶ÔÏóʵÀý¼°ÈçºÎÁ¬½ÓÊý¾Ý¿â²¢½øÐÐÒì


Ïà¹ØÎĵµ£º

C++/CһЩÀàÐ͵ÄÈ¡Öµ·¶Î§

long longµÄ×î´óÖµ£º9223372036854775807
long longµÄ×îСֵ£º-9223372036854775808
unsigned long longµÄ×î´óÖµ£º1844674407370955161
__int64µÄ×î´óÖµ£º9223372036854775807
__int64µÄ×îСֵ£º-9223372036854775808
unsigned __int64µÄ×î´óÖµ£º18446744073709551615
ÎҵĵçÄÔ¶Ô__int128²»Ö§³Ö£¬Õâ¸ö¿ÉÄÜÊÇÔ¤Áô¸ø½«À ......

mysql connect c++

ÏÈÇ°ÔÚ²âÊÔmysql connect c++½Ó¿ÚµÄʱºòÔËÐÐÆä¹Ù·½ÌṩµÄÀý×Ó
21.5.5.6. MySQL Connector/C++ Complete Example 2
The following code shows a complete example of how to use MySQL Connector/C++:
/* Copyright 2008 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify ......

ÈçºÎÀí½âcºÍc++ µÄ¸´ÔÓÀàÐÍÉùÃ÷

Ôø¾­Åöµ½¹ýÈÃÄãÃԻ󲻽⡢ÀàËÆÓÚint * (* (*fp1) (int) ) [10];ÕâÑùµÄ±äÁ¿ÉùÃ÷Â𣿱¾ÎĽ«ÓÉÒ×µ½ÄÑ£¬Ò»²½Ò»²½½Ì»áÄãÈçºÎÀí½âÕâÖÖ¸´ÔÓµÄC/C++ÉùÃ÷¡£
¡¡¡¡ÎÒÃǽ«´ÓÿÌ춼ÄÜÅöµ½µÄ½Ï¼òµ¥µÄÉùÃ÷ÈëÊÖ£¬È»ºóÖð²½¼ÓÈëconstÐÞÊηûºÍtypedef£¬»¹Óк¯ÊýÖ¸Õ룬×îºó½éÉÜÒ»¸öÄܹ»ÈÃÄã׼ȷµØÀí½âÈκÎC/C++ÉùÃ÷µÄ“ÓÒ×ó·¨Ôò”¡£ ......

C/C++ÓïÑÔvoid¼°voidÖ¸ÕëÉî²ã̽Ë÷

½ñÌìÓиö¸Õ¸Õ±ÏÒµµÄСÅóÓÑÎÊÎÒ¹ØÓÚvoid*µÄһЩÎÊÌ⣬¸ÕºÃÔÚÍøÉÏÕÒµ½ÁËһƪ±È½ÏÏêϸ˵Ã÷µÄÎÄÕ£¬×ªÔØÖ®......
1.¸ÅÊö
¡¡¡¡
¡¡¡¡Ðí¶à³õѧÕ߶ÔC/C++ÓïÑÔÖеÄvoid¼°voidÖ¸ÕëÀàÐͲ»ÉõÀí½â£¬Òò´ËÔÚʹÓÃÉϳöÏÖÁËһЩ´íÎó¡£±¾ÎĽ«¶Ôvoid¹Ø¼ü×ÖµÄÉî¿Ìº¬Òå½øÐнâ˵£¬²¢ÏêÊövoid¼°voidÖ¸ÕëÀàÐ͵ÄʹÓ÷½·¨Óë¼¼ÇÉ¡£
¡¡¡¡2.voidµÄº¬ ......

Visual C++ C runtime¿âÃû³Æ·ÖÎö

µ¥Ïß³Ì
Single-Threaded(static)                            libc.lib
Debug Single-Threaded(static)           & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ