ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

³s±µ Paradox ¥Î sql «ü¥O ¦b timestamp ®æ¦¡®É¦³°ÝÃD

³s±µ Paradox ¥Î sql «ü¥O ¦b timestamp ®æ¦¡®É¦³°ÝÃD

hi
  ¤j®a¦n.¤p§Ì³Ìªñ»Ý­n¥ÎEXCEL³s±µ¥~³¡ Paradox ªº¸ê®Æ®wÀÉ®× .db
µ{¦¡¤]¤w¸g¥¿½T³s±µ¨ì.¸ê®Æ¤]¥i¥H©Ô¨ìEXCEL
¦ý¬O­Y¥[¤W SQL ªºWhere ©R¥O ·j Timestamp ³oºØ®æ¦¡ ´N¤£·|¥¿±`§ä¥X.
§¹¾ãªºµ{¦¡¦p¤U.
¨ä¤¤ªºSQL©R¥O
    AllSql = "Select * From Alarm where OnTime>=2014-01-16 "
¤¤ªº¤é´Á¹Á¸Õ¹L«Ü¦h®æ¦¡³£¨S¿ìªk.¦p
2014-01-16
01-16-2014
2014/01/06
01/06/2014



Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
   
    '«Å§i
    Dim cnn As New ADODB.Connection
    Dim rst As New ADODB.Recordset
    Dim AllSql As String
    'Ū¨ú¥Ø¿ý
    ReadDir = "c:\EpmsServer\DataBase\"
    '
    AllSql = "Select * From Alarm where OnTime>=2014-01-16 "
    'Ū¨ú db
    cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & ReadDir & ";" & "Extended Properties=Paradox 5.x;"
    rst.Open AllSql, cnn, , , adCmdText
    'db©ñ¨ìªí®æ
    Range("A3").CopyFromRecordset rst

End Sub

Desktop.rar (146.45 KB)

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD