Click here to Skip to main content
15,880,608 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to insert Apostrophe or Single Quote key access DB through dynamic string? Pin
JC.KaNNaN20-Jul-09 20:58
JC.KaNNaN20-Jul-09 20:58 
AnswerRe: how to insert Apostrophe or Single Quote key access DB through dynamic string? Pin
Christian Graus20-Jul-09 21:55
protectorChristian Graus20-Jul-09 21:55 
QuestionSending SMS Through VB 6 Pin
jayachandra.c20-Jul-09 20:47
jayachandra.c20-Jul-09 20:47 
AnswerRe: Sending SMS Through VB 6 Pin
Christian Graus20-Jul-09 21:54
protectorChristian Graus20-Jul-09 21:54 
QuestionCould not Focus Cell In DataGridView Pin
rhtbhegade20-Jul-09 20:38
rhtbhegade20-Jul-09 20:38 
AnswerRe: Uppercase in datagridview cell Pin
Sreyas M N12-Nov-09 18:49
Sreyas M N12-Nov-09 18:49 
AnswerRe: Could not Focus Cell In DataGridView Pin
Sreyas M N12-Nov-09 19:17
Sreyas M N12-Nov-09 19:17 
QuestionImporting CSV files without header Pin
Astitva2320-Jul-09 12:37
Astitva2320-Jul-09 12:37 
Dim cn As New OleDbConnection
Dim adapter As New OleDbDataAdapter
Dim dtset As New DataSet
Dim dt As New DataTable
Dim cmd As New OleDbCommand


Dim sqlconnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sourceDirectory & ";" & _
"Extended Properties=""Text;HDR=No;"""

cn.ConnectionString = sqlconnectionString
'Open the Jet connection to read the CSV file
Try
cn.Open()

Catch e As Exception

End Try
Try

'Connection to the csv file and dump the data into a dataset
cmd.Connection = cn

cmd.CommandText = "Select * from " & sourceFile
'Attempt to fill a Datatable with the data from the CSV

adapter.SelectCommand = cmd
adapter.Fill(dtset, "CSVdata")

dt = dtset.Tables("CSVdata")

cn.Close

I am trying to read a csv file without any headers but I am getting one record short of actual no of rows. Is there something I am missing. The HDR option isn't really helpful.

Thanks in advance
QuestionDifference between Scripting.Drive and DriveInfo: One works to detect external usb device, one doesn't Pin
babybass20-Jul-09 8:15
babybass20-Jul-09 8:15 
AnswerRe: Difference between Scripting.Drive and DriveInfo: One works to detect external usb device, one doesn't Pin
Alan N20-Jul-09 9:55
Alan N20-Jul-09 9:55 
GeneralRe: Difference between Scripting.Drive and DriveInfo: One works to detect external usb device, one doesn't Pin
babybass20-Jul-09 10:57
babybass20-Jul-09 10:57 
QuestionTriplesDES error Pin
TheMrProgrammer20-Jul-09 7:10
TheMrProgrammer20-Jul-09 7:10 
AnswerRe: TriplesDES error Pin
Luc Pattyn20-Jul-09 7:54
sitebuilderLuc Pattyn20-Jul-09 7:54 
GeneralRe: TriplesDES error Pin
TheMrProgrammer20-Jul-09 21:07
TheMrProgrammer20-Jul-09 21:07 
GeneralRe: TriplesDES error Pin
Luc Pattyn21-Jul-09 1:41
sitebuilderLuc Pattyn21-Jul-09 1:41 
Questionhow to return dataadapter and data set from the same function Pin
hemrk20-Jul-09 6:08
hemrk20-Jul-09 6:08 
AnswerRe: how to return dataadapter and data set from the same function Pin
Christian Graus20-Jul-09 14:37
protectorChristian Graus20-Jul-09 14:37 
GeneralRe: how to return dataadapter and data set from the same function Pin
hemrk20-Jul-09 15:47
hemrk20-Jul-09 15:47 
Questionuseing .MovePrevious() etc Pin
StephenFinch20-Jul-09 2:31
StephenFinch20-Jul-09 2:31 
AnswerRe: useing .MovePrevious() etc Pin
Johan Hakkesteegt20-Jul-09 2:48
Johan Hakkesteegt20-Jul-09 2:48 
GeneralRe: useing .MovePrevious() etc Pin
StephenFinch20-Jul-09 3:02
StephenFinch20-Jul-09 3:02 
QuestionValidating a cell in DataGrid Pin
rhtbhegade20-Jul-09 0:51
rhtbhegade20-Jul-09 0:51 
AnswerRe: Validating a cell in DataGrid Pin
Jay Royall20-Jul-09 1:02
Jay Royall20-Jul-09 1:02 
GeneralRe: Validating a cell in DataGrid Pin
rhtbhegade20-Jul-09 2:11
rhtbhegade20-Jul-09 2:11 
GeneralRe: Validating a cell in DataGrid Pin
Jay Royall20-Jul-09 2:27
Jay Royall20-Jul-09 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.