|
よろしくお願い致します
Public Sub Get_Csv()
Dim dbCon As ADODB.Connection
Dim dbRes As ADODB.Recordset
Dim COL As Long
Dim strSQL As String
Dim MyRow As Long
Dim tg_rec As Variant
Dim I As Long
Dim J As Long
Set dbCon = New ADODB.Connection
With dbCon
.Provider = "Microsoft.Jet.OLEDB.4.0"
'.Properties("Extended Properties") = "Text"
.Properties("Extended Properties") = "Text;FMT=Delimited;HDR=yes;"
.Open CurrentProject.Path & "\"
End With
strSQL = "SELECT * FROM hoge.csv"
Set dbRes = New ADODB.Recordset
'dbRes.Open strSQL, dbCon, adOpenDynamic, adLockOptimistic, adCmdText
dbRes.Open strSQL, dbCon, adOpenKeyset, adLockOptimistic, adCmdText
dbRes.Filter = "[F0str] = '001'" ←ココ
で
実行時エラー '-2147352571 (80020005)':
種類が一致しません。
どう記述すればいいでしょうか
アドバイスよろしくお願い致します
|
|