Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm tring to import a csv file by using the following code:
Dim csvFolder As String Dim sConnectionString As String Dim objConn As New ADODB.Connection Dim rs As New Recordset csvFolder = "C:\csvdata\" sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & csvFolder & ";Extended Properties=Text;" objConn.Open sConnectionString SelectStr = "SELECT testing_A1D from Main.csv" rs.Open SelectStr, objConn, adOpenDynamic When I run the code, I got the following error message: "No value given for one or more required parameters" But if I try to use "Select * " I can get the data. However, I noted that the fieldname changed to "testing_A#1D". I also tried "SELECT testing_A#1D from Main.csv", but I got another error: Syntax errro in date in query expression 'testing_A#1D' Please advice how to solve the problem. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import Problem | New Users to Excel | |||
Import problem | New Users to Excel | |||
How to know Rank Of FieldName ?? | Excel Worksheet Functions | |||
Save file as filename plus fieldname | Excel Programming | |||
Import problem | New Users to Excel |