ÓÃ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))
 
Ïà¹ØÎĵµ£º
н¨±í£º
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 [±í ......
Ò»¡¢´´½¨Ò»ÕÅ¿Õ±í£º
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");
Ò»¿´£¬Ó¦¸ÃûʲôÎÊÌ ......
½ñÌ죬»¹ÊÇÔÚ×öÄǸöÏîÄ¿£¬ÒÀȻʹÓÃÍù³£µÄsqlhelperÓ÷¨£¬Íù³£µÄÊý¾Ý¿â²Ù×÷À࣬µ«ÊÇÆ«Æ«µ÷ÊÔ²»³É¹¦£¬¶øÇÒ×îÖØÒªµÄÊÇ£¬Ëü²»±¨´í
ÖÐÎç³Ô·¹»ØÀ´£¬±¾À´Ïë´òËã˯¸öÎç¾õµÄ£¬µ«ÊÇÏîÄ¿Ì«½ôÆÈÁË£¬ÓÚÊÇÓÖ¸ú³µ³µÑо¿ÁËÒ»ÖÐÎ磬×îºó£¬·¢ÏÖÈç¹û²»ÓÃ@²ÎÊý´«µÝµÄ»°£¬ÊÇÕý³£ÔËÐеģ¬ÓÚÊÇ°Ù¶ÈÁËһϣ¬ÄÇЩÈË˵ҪÓÓ£¿”µ±Õ¼Î»·û
......
ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚ Transact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERV ......