Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

csv, ado, datagrid problem

Status
Not open for further replies.

bbolte

Programmer
Sep 30, 2002
113
US
i'm trying to get a csv file into a datagrid. here's the code:

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

no errors but nothing is in the datagrid either...
 
By setting the datagrid to Nothing you are clearing it. Comment out that line and it should work. Set it to Nothing before you unload the form.

Swi
 
i had done that already and it didn't make a difference. i've got it working with a little different set up. thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top