bbolte
04-19-2004, 11:11 AM
I'm getting a path not found error using ADO with a .csv file
connCSV.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\ShipFDX\ARCHIVE\Apr1904-LTL.csv';" _
I know this path is correct, I have the directory open and they are both the same. The error number returned is 2147467259. Any ideas?
CrystalWizard
04-19-2004, 11:23 AM
Try taking the single qutoes off of the file path
Data Source=C:\ShipFDX\ARCHIVE\Apr1904-LTL.csv
bbolte
04-19-2004, 12:02 PM
did that already, same error
connCSV.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ShipFDX\ARCHIVE\Apr1904-LTL.csv;" _
& "Extended Properties='text;HDR=NO;FMT=Delimited'"
CrystalWizard
04-19-2004, 12:28 PM
Have you tried taking the single quotes off of
Extended Properties='text;HDR=NO;FMT=Delimited'
as well?
bbolte
04-19-2004, 12:40 PM
I actuall had to remove the file reference and leave an open path. here is where i'm at with it now:
Set connCSV = New ADODB.Connection
connCSV.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ShipFDX\ARCHIVE\;Extended Properties=text;HDR=NO;FMT=Delimited"
sSQL = "SELECT * FROM [Apr1904-LTL.csv]"
Set dgShip.DataSource = connCSV.Execute(sSQL)
Set dgShip.DataSource = Nothing
with this, the invalid path is gone but now the error still has the same number, but says: (Could not find installable ISAM.) :confused:
bbolte
04-19-2004, 12:44 PM
i've changed the connection to this:
With connCSV
.CursorLocation = adUseClient
.ConnectionString = "Driver={Microsoft Text Driver (*.txt; *.csv)};Initial Catalog=C:\ShipFDX\ARCHIVE\"
.Open
End With
but the datagrid is empty - no error thrown...
CrystalWizard
04-19-2004, 01:09 PM
This may help.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q209805
bbolte
04-19-2004, 01:11 PM
ok, go through all that, no error now. but no data displayed either. current code...
Set connCSV = New ADODB.Connection
With connCSV
.CursorLocation = adUseClient
.ConnectionString = "Driver={Microsoft Text Driver (*.txt; *.csv)};Initial Catalog=C:\ShipFDX\ARCHIVE\"
.Open
End With
sSQL = "SELECT * FROM [Apr1904-LTL.csv]"
'// bind to dg
Set dgShip.DataSource = connCSV.Execute(sSQL)
Set dgShip.DataSource = Nothing
truly appreciate the help btw...
CrystalWizard
04-19-2004, 01:24 PM
Can you show the code where you are trying to display this?
bbolte
04-19-2004, 01:29 PM
Can you show the code where you are trying to display this?
it's the last 2 lines of what I posted:
'// bind to dg
Set dgShip.DataSource = connCSV.Execute(sSQL)
Set dgShip.DataSource = Nothing
CrystalWizard
04-19-2004, 02:01 PM
My only thoughts would be that maybe the datagrid information should be entered cell by cell via a recordset rather than all at once.
bbolte
04-19-2004, 02:32 PM
My only thoughts would be that maybe the datagrid information should be entered cell by cell via a recordset rather than all at once.
ok. i'll look into. thanks for the help...