主题:求救!!! VB使用ADODB的SQL语句导入CSV文件问题
求救!!! VB使用ADODB的SQL语句导入CSV文件问题
导入时有些字段被自动取整了 我想用带小数的
Dim pubConn As New ADODB.Connection
Dim rsTable As New ADODB.Recordset
FilePath = App.Path & "\TEMP"
strConn = "Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=" & FilePath & ";Extensions=asc,csv,tab,txt;Persist Security Info=False"
pubConn.Open strConn
rsTable.CursorLocation = adUseClient
strSQL2 = "Select PERIOD_DATE,TCH_BLK From KPI.csv"
rsTable.Open strSQL2, pubCon, adOpenDynamic, adLockReadOnly
Set VSFlexGrid4.DataSource = rsTable
Set rsTable = Nothing
以上使用SQL语句时TCH_BLK字段有小数,被自动取整了,谁有办法不要让它取整???????
哪位大哥帮帮忙!!!!!!!!!!!!
导入时有些字段被自动取整了 我想用带小数的
Dim pubConn As New ADODB.Connection
Dim rsTable As New ADODB.Recordset
FilePath = App.Path & "\TEMP"
strConn = "Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=" & FilePath & ";Extensions=asc,csv,tab,txt;Persist Security Info=False"
pubConn.Open strConn
rsTable.CursorLocation = adUseClient
strSQL2 = "Select PERIOD_DATE,TCH_BLK From KPI.csv"
rsTable.Open strSQL2, pubCon, adOpenDynamic, adLockReadOnly
Set VSFlexGrid4.DataSource = rsTable
Set rsTable = Nothing
以上使用SQL语句时TCH_BLK字段有小数,被自动取整了,谁有办法不要让它取整???????
哪位大哥帮帮忙!!!!!!!!!!!!