ªð¦^¦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 : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD