ÓÃVFPÁгöACCESSËùÓбíµÄ×ֶνṹ£¬º¬±êÌâ¡£
set safety off
local oo,lcStr,lcMdbFile,i,x,lnFields,lcTableName,lnFieldtype,lcCurdir
lcCurdir = sys(5) + curdir()
lcNowdir = getdir()
cd (lcNowdir)
oo = NEWOBJECT('Access.Application')
oo.AutomationSecurity = 1
oo.UserControl = .F.
lcMdbFile = getFile('mdb')
if not empty(lcMDBFile)
oo.OpenCurrentDatabase(lcMDBFile)
lnTables = oo.CurrentDb.TableDefs.Count
for i = 5 to lnTables - 1
lcStr = ''
lnFields = oo.CurrentDb.TableDefs(i).fields.count
*lcTableName = JUSTSTEM(lcMDBFile) + '_' + oo.CurrentDb.TableDefs(i).Name
lcTableName = oo.CurrentDb.TableDefs(i).Name
*use
if i = 5
* create Table (lcTableName) (×Ö¶ÎÃû char(10),ÀàÐÍ char(10),¿í¶È char(4),СÊýλ char(4),±êÌâ char(50),¶ÔÓ¦×ֶΠchar(20))
create Table blank (×Ö¶ÎÃû char(9),ÀàÐÍ char(10),¿í¶È char(2),СÊýλ char(4),±êÌâ char(24),¶ÔÓ¦×ֶΠchar(20),±íÃû char(10))
 
Ïà¹ØÎĵµ£º
Ò»¡¢´´½¨Ò»ÕÅ¿Õ±í£º
Sql="Create TABLE [±íÃû]"
¶þ¡¢´´½¨Ò»ÕÅÓÐ×Ö¶ÎµÄ±í£º
Sql="Create TABLE [±íÃû]([×Ö¶ÎÃû1] MEMO NOT NULL, [×Ö¶ÎÃû2] MEMO, [×Ö¶ÎÃû3] COUNTER NOT NULL, [×Ö¶ÎÃû4] DATETIME, [×Ö¶ÎÃû5] TEXT(200), [×Ö¶ÎÃû6] TEXT(200))
×Ö¶ÎÀàÐÍ£º
2 : "SmallInt", // ÕûÐÍ
3 : "Int", ......
ÔÚдÕâƪ²©ÎĵÄʱºò£¬ÎÒÕæµÄÈ̲»×¡½ÐÒ»Éù£¬ËûÂèµÄ±ä̬£¬½ñÌì×öÒ»¸öÍøվʱºò£¬ÓÉÓÚÒªÓõ½ACCESS£¬ÄǾÍÓÃÁË£¬°Ñ֮ǰµÄÁ´½ÓÓï¾äCOPY+C¹ýÀ´
¿´¿´ÓÐʲôÎÊÌâ¡£
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="+System.Web.HttpContext.Current.Server.MapPath("window2003.mdb");
Ò»¿´£¬Ó¦¸ÃûʲôÎÊÌ ......
1.Á¬½ÓAccessµÄÁ¬½Ó×Ö·û´®
string strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @FileName;
2.Á¬½ÓExcel
string strExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + @FileName + ";Extended Properties=Excel 8.0;"; ......
Å×ÆúMS Access°É£¬ÇëʹÓÃSQLite
1¡¢SQLite¼ò½é
SQLiteµÚÒ»¸öAlpha°æ±¾µ®ÉúÓÚ2000Äê5ÔÂ. ÖÁ½ñÒѾÓÐ4¸öÄêÍ·ÁË. ¶øÔÚ½ñÄêµÄ5ÔÂSQLiteÒ²ÓÀ´ÁËÒ»¸öеÄÀï³Ì: SQLite 3. SQLite¹Ù·½ÍøÕ¾: http://www.sqlite.org/
2¡¢SQLiteÀàÐÍ
SQLiteµÄÊý¾ÝÀàÐÍ
Ê×ÏÈÄã»á½Ó´¥µ½Ò»¸öÈÃÄ㾪ÑȵÄÃû´Ê: Typelessness(ÎÞÀàÐÍ). ¶Ô! SQLiteÊÇÎÞ ......
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();
......