Access ÀàÐÍת»»º¯Êý
Ç°ÑÔ
×î½üÒ»Ö±ÔÚ×öAccessÊý¾Ýµ¼ÈëOracleµÄÒ»¸ö³ÌÐò£¬¾¡¹ÜÏîÄ¿ÒѾÍê³É£¬µ«ÊÇÓÐʱҲ»áÓöµ½ÎÊÌ⣬×îÖ÷Òª»¹ÊǶÔAccess²»ÊìϤµÄÔÒò£¬ÌرðÊÇÀàÐÍת»»£¬¶øÕâ¸öÊÇÎÒÕâ¸öÏîÄ¿ÖÐÒ»¶¨»áÓöµ½µÄ¡£ËùÒÔ¿´µ½ÕâÑùһƪÎÄÕÂͦºÃµÄ£¬¾Íת¹ýÀ´ÁË¡£
תÌùµØÖ·£ºhttp://www.cnblogs.com/wf225/archive/2008/10/09/1307241.html
ÿ¸öº¯Êý¶¼¿ÉÒÔ½«±í´ïʽ
£¨±í´ïʽ£ºËãÊõ»òÂß¼ÔËËã·û¡¢³£Êý¡¢º¯ÊýºÍ×Ö¶ÎÃû³Æ¡¢¿Ø¼þºÍÊôÐÔµÄÈÎÒâ×éºÏ£¬¼ÆËã½á¹ûΪµ¥¸öÖµ¡£±í´ïʽ¿ÉÖ´ÐмÆËã¡¢²Ù×÷×Ö·û»ò²âÊÔÊý¾Ý¡££©Ç¿ÖÆת»»ÎªÌض¨µÄÊý¾ÝÀàÐÍ
£¨Êý¾ÝÀàÐÍ£º¾ö¶¨×ֶοÉÓµÓеÄÊý¾ÝÀàÐ͵Ä×Ö¶ÎÌØÕ÷¡£Êý¾ÝÀàÐÍ°üÀ¨
Boolean¡¢Integer¡¢Long¡¢Currency¡¢Single¡¢Double¡¢Date¡¢String ºÍ Variant£¨Ä¬ÈÏ£©¡££©¡£
Óï·¨
CBool(expression)
CByte(expression)
CCur(expression)
CDate(expression)
CDbl(expression)
CDec(expression)
CInt(expression)
CLng(expression)
CSng(expression)
CStr(expression)
CVar(expression)
±ØÑ¡µÄ expression ²ÎÊý £¨²ÎÊý£ºÎª²Ù×÷¡¢Ê¼þ¡¢·½·¨¡¢ÊôÐÔ¡¢º¯Êý»ò¹ý³ÌÌṩÐÅÏ¢µÄÖµ¡££©¿ÉÒÔΪÈκÎ×Ö·û´®±í´ïʽ
£¨×Ö·û´®±í´ïʽ£ºÈÎÒ»ÇóֵΪһÁÐÁ¬Ðø×Ö·ûµÄ±í´ïʽ¡£±í´ïʽµÄÔªËØ¿ÉÒÔÊÇ£º·µ»Ø×Ö·û´®»ò×Ö·û´® Variant (VarType 8)
µÄº¯Êý£»×Ö·û´®×ÖÃæÖµ¡¢³£Á¿¡¢±äÁ¿»ò Variant¡££©»òÊýÖµ±í´ïʽ
£¨Êý×Ö±í´ïʽ£º¼ÆËã½á¹ûΪÊý×ÖµÄÈκαí´ïʽ¡£±í´ïʽ¿ÉÒÔÊDZäÁ¿¡¢³£Êý¡¢º¯ÊýºÍÔËËã·ûµÄÈÎÒâ×éºÏ¡££©¡£
·µ»ØÀàÐÍ
º¯ÊýÃû³Æ¾ö¶¨·µ»ØÀàÐÍ£¬ÈçÏÂËùʾ£º
º¯Êý ·µ»ØÀàÐÍ expression ²ÎÊýµÄ·¶Î§
CBool Boolean ÈκÎÓÐЧµÄ×Ö·û´®»òÊýÖµ±í´ïʽ¡£
CByte Byte 0
µ½ 255¡£
CCur Currency -922,337,203,685,477.5808 µ½ 922,337,203,685,477.5807¡£
CDate Date ÈκÎÓÐЧµÄÈÕÆÚ±í´ïʽ¡£
CDbl Double ¶ÔÓÚ¸ºÖµ£¬-1.79769313486231E308 µ½
-4.94065645841247E-324£»¶ÔÓÚÕýÖµ£¬4.94065645841247E-324 µ½ 1.79769313486232E308¡£
CDec Decimal ¶ÔÓÚÕûÊý£¨¼´Ã»ÓÐСÊýµÄÊý×Ö£©£¬+/-79,228,162,514,264,337,593,543,950,335¡£¶ÔÓÚ¾ßÓÐ
28 λСÊýµÄÊý×Ö£¬ÖµÓò·¶Î§ÊÇ
+/-7.9228162514264337593543950335¡£¿ÉÄܵÄ×îС·ÇÁãÊý×ÖΪ
0.0000000000000000000000000001¡£
CInt Integer -32,768 µ½ 32,767£»Ð¡Êý²¿·Ö±»ËÄÉáÎåÈë¡£
CLng Long -2,147,483,648 µ½ 2,147,483,647£»Ð¡Êý²¿·Ö±»ËÄ
Ïà¹ØÎĵµ£º
н¨±í£º
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1) PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] datetime,
[×Ö¶Î4] money null ,
[×Ö¶Î5] int default 0,
[×Ö¶Î6] Decimal (12,4) default 0,
[×Ö¶Î7] image null ,
)
ɾ³ý±í£º
Drop table [±í ......
public static DataTable GetSchemaTable(string connectionString) //»ñÈ¡AccessËùÓеıíÃû£»
{
using (OleDbConnection connection = new
&n ......
ÔÚSQL ServerÖÐÄ£ºý²éѯͨ³£ÊÇÕâÑùµÄSelect * from articleTable where authorName like '%jacky%'
µ«ÊÇÔÚAccessÖÐÓÃÕâÌõÓï¾äÖ´ÐеÄʱºò¾¹È»·¢Ïֲ鲻³ö½á¹û£¬Ôõô¿ÉÄÜÄØ£¿
ºóÀ´²éÁËÏÂ×ÊÁÏ£¬·¢ÏÖÎÊÌâÈçÏ£º
Òª½øÐÐÄ£ºý²éÕÒ£¬Ôò±ØÐëʹÓÃͨÅä·û£¬ACCESS¿âµÄͨÅä·ûºÍSQL SERVERµÄͨÅä·û²»Ò»Ñù¡£
ACCESS¿âµÄͨÅä·ûΪ£º
*& ......
ACCESSÔ¶³Ì±¸·ÝÒ»Ö±ÊǸöÁîÈËÍ·ÌÛµÄÎÊÌâ ¿´µ½Ò»¸ö²»´íµÄ±¸·Ý·½·¨ ·ÖÏíÏ£º
ÔÎĵØÖ·£ºhttp://www.cnblogs.com/catcat811/archive/2009/12/31/1637186.html
ÍøÕ¾ÓÖ¹ØÁË~~~¹ØµÃºÜͻȻ£¬Êý¾ÝÒ²À´²»¼°±¸·Ý¡£ÒòΪ¹«Ë¾Óиö²Ö¿âµÄϵͳÔÚ×âÓ÷þÎñÆ÷ÉÏ£¬Èç¹ûÍ£Á˾͵ÃÖØеã²Ö£¬ÄÇÊǺÜÀÛÈ˵ÄÊ¡£×î½üÍøվʱ³£¹Ø£¬ÕæÈÃÈËÍ·Í´¡£ÎªÁ˱Üà ......
1:ÔÚStaAfx.h ÖÐÌí¼ÓÈçÏ´úÂë #import "C:\\Program Files\\Common Files \\System\\ado\\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF")
2:ÔÚBOOL CXXXApp::InitInstance()Öгõʼ»¯COM»·¾³
::CoInitialize(NULL);
ÊÍ·ÅCOM»·¾³
::CoUninitialize();
......