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

Access導³öExecl

VB+Access×öµÄϵ統£¬
為·½±ã²é閱與´òÓ¡£¬
Ðè導³ö為execl±í¸ñ£¬
help¡£
環¾³£ºAccess±íÊÇAccess 2000£»

ÍøÉϺܶà,°Ù¶ÈÒ»ÏÂ

¹Ø×¢£¡

´°Ìå´úÂë
VB code:

Private Sub outcstinf_Click() 'µ¼³ö×ÊÁÏΪXLS
Dim i As Integer 'ÐÐ
Dim j As Integer 'ÁÐ
Call openXLT("Custom.xlt")'Custom.xltÊÇÒ»¸öÓëÒªµ¼³öµÄÊý¾Ý±í¸ñʽÏàͬµÄexcelÄ£°åÎļþ
Call OpenConn
sql = "select * from Òªµ¼³öµÄ±í ORDER BY ÓÃÓÚÅÅÐòµÄ×Ö¶Î(Ò»°ãÊDZàºÅ) ASC"
rs.Open sql, cn, 1, 1
If rs.RecordCount < 1 Then
MsgBox "Êý¾Ý¿âÖÐûÓмǼ£¡": Exit Sub
Else
i = 2'´ÓxlsµÄµÚ¶þÐпªÊ¼Ð´Èë(Ä£°åÖеÚÒ»ÐÐÒÑ×÷Ϊ×Ö¶ÎÃû±£Áô)
Do While Not rs.EOF
For j = 0 To rs.Fields.Count - 1 'Ñ­»·Êý¾Ý±íµÄ0ÖÁ×îºóÒ»ÁÐ
xlsheet.Cells(i, j + 1) = rs.Fields(j) 'дÈë(Êý¾Ý±í×Ö¶ÎË÷ÒýÊÇ´Ó0¿ªÊ¼,¶øxlsµÄÁÐʾ´Ó1¿ªÊ¼, Òò´ËÒªj+1)
Next
rs.MoveNext
i = i + 1 'Ìøµ½i+1ÐмÌÐøдÈë
Loop
End If
Call CloseConn
Call closeXLT
sql = ""
End Sub


Ä£¿é´úÂë
VB code:

Public xlApp As Excel.Ap


Ïà¹ØÎÊ´ð£º

php ʹÓà ADODB Á¬½ÓAccess µÄÎÊÌâ

<?php

include("adodb/adodb.inc.php");

$db = &NewADOConnection("access");
$access = realpath("Data.mdb");
$dsn = "Provider=Microsoft.J ......

access µ¼Èë access ת»»ÎÞЧ!ÔÚÏßµÈ!

´ÓÀàÐÍ"DBNULL" µ½ÀàÐÍ¡°Double¡±µÄת»»ÎÞЧ£¨Êý¾Ý¿âÖжÔÓ¦µÄ a3 »òa5 ûÓÐÊý¾ÝÊÇΪ¿Õ£©
,ÇëÎÊÎÒÔõô´¦Àí£¡

VB.NET code:

Dim a1 As String = Nothing
Dim a2 As S ......

access¹ýÂËÎÊÌ⣬ÓÐÇë´óÏÀÃÇ

sqlÓï¾ä£º
SELECT  top 12  Forum.ID,Forum.topic,Reforum.id,Reforum.username,Reforum.posttime,Reforum.postip,Forum.username from Forum INNER JOIN Reforum ON Forum.ID = Reforum.topicid wher ......

ÈçºÎͨ¹ýADOʹÓþۺϺ¯ÊýÀ´²éѯ(Êý¾Ý¿âΪACCESS)

_RecordsetPtr CMyAdo::SelectRecord(string &where, string &tablename,string &field, int way )
{
    int ret = 0;
  _RecordsetPtr pset;
CString  sql;
& ......

¹úÇì½ÚÒ»ÎÊ: ÈçºÎÅúÁ¿¸üÐÂAccessÖÐ×ֶβ¿·ÖÄÚÈÝ?

ÎÒÏÖÔÚaccess±íÖÐijһ×Ö¶ÎA ÓÐÏÂÃæµÄÄÚÈÝ(Ö»ÊǺóÃæµÄ²¿·Ö²»Ïàͬ)

1.http://www.google.cn/search?client=pub-475201884&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN&q=ËûºÍËýµÄÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ