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

¶¯Ì¬´´½¨accessÊý¾Ý¿âµÄÎÊÌâ2

´´½¨µÄ¹ý³ÌÖгöÏÖdatabase login¶Ô»°¿ò£¬ÇëÎÊÔõôÑù²»ÈøöԻ°¿ò³öÏÖ£¿ÁíÍâÈçºÎ¶¨ÒåÈÕÆÚÐÍÊý¾ÝΪ¶ÌÈÕÆÚÐÍ£¿ºÃÏñÖ»Äܶ¨ÒåΪDatetime¡£

Ô´ÂëÈçÏ£º
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½

procedure Tfrmweihu.btncjsjkClick(Sender: TObject);
var
path,StrSQL:string;
CreateAccess: OleVariant;
ADOConn: TADOConnection;
const
AConnectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s';
begin
//´´½¨Êý¾Ý¿âÎļþ
Path := ExtractFilePath(Application.ExeName);
if FileExists(Path + 'mydata.mdb') then
  begin
  showmessage('Êý¾Ý¿âÎļþÒѾ­´æÔÚ£¡');
  exit;
  end;
CreateAccess:=CreateOleObject('ADOX.Catalog');
CreateAccess.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source= '+Path+'mydata.mdb');

//´´½¨Êý¾Ý±í
ADOConn:=TADOConnection.create(self);
ADOConn.ConnectionString:=Format(AConnectionString,[Path +'mydata.mdb','']);
Strsql := 'create table mydata (ID autoincrement PRIMARY KEY not null,±êÇ©1 char(50) not null,±êÇ©2 char(50),±êÇ©3 char(50),±êÇ©4 char(50),±êÇ©5 char(50),±êÇ©6 char(50),ÕýÎÄ1 text not null,ÕýÎÄ2 text,ÈÕÆÚ Datetime not null)';
ADOConn.Execute(strsql);
ADOConn.Close;
ADOConn.Free;
Showmessage('Êý¾Ý±í´´½¨³É¹¦,'+#13#10+'ÇëÖØÐÂÆô¶¯±¾³ÌÐò£¡');


Ïà¹ØÎÊ´ð£º

asp¸úAccessÊý¾ÝÁ¬½ÓÎÊÌâ¡£

IsSqlDataBase = 0 'Ö÷Êý¾Ý¿âÀàÐÍ(1=SQL£¬0=AC)

'===========================================================================
SqlDatabaseName = "ads365" 'Ö÷Êý¾Ý¿âÃû
S ......

Access Êý¾ÝÉýǨµ½ SQLServer2005

ÎÒÔ­±¾ÊÇÓÃACCESSµÄÊý¾Ý¿â£¬ÏÖÔÚ¸ÄÓÃSQLServer2005ÁË£¬ËùÒÔÏë°Ñ֮ǰµÄÊý¾ÝÈ«¶¼µ¼µ½SQLSERVERÀïÀ´¡£
ÏÖÓÐÎÊÌâÈçÏ£º

1:¸ÄÓÃSQLserverºó£¬Êý¾Ý¿âµÄ½á¹¹Óи͝¡£Ô­±¾ÔÚaccessÖÐËùÓеĵ¥¾ÝÓÃÒ»¸ö¡°µ¥¾ÝÐÅÏ¢¡±Ö ......

Access導³öExecl

VB+Access×öµÄϵ統£¬
Ôõ樣°Ñ數據庫Access內ÈÝ導³öexecl£¿
ÏÖÔÚû¶«Î÷ÊÔ£¬´ÓÍøÉÏÕÒÁ˶δúÂëÄã¿´¿´
VB code:

Private Sub ExportOneTable()
'EXPORTS TABLE IN ......

Çë½ÌaccessÊý¾Ý¿â¶¯Ì¬Éú³ÉµÄÎÊÌâ

//**********************************
//³ÌÐò¹¦ÄÜ£º´´½¨AccessÊý¾Ý¿âºÍÊý¾Ý±í
//**********************************
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ