Click here to Skip to main content
15,893,588 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCan’t create New Array. Pin
enipla10-Apr-09 5:31
enipla10-Apr-09 5:31 
AnswerRe: Can’t create New Array. Pin
riced10-Apr-09 6:00
riced10-Apr-09 6:00 
GeneralRe: Can’t create New Array. Pin
enipla10-Apr-09 8:32
enipla10-Apr-09 8:32 
GeneralRe: Can’t create New Array. Pin
riced10-Apr-09 8:39
riced10-Apr-09 8:39 
AnswerRe: Can’t create New Array. Pin
Dave Kreskowiak10-Apr-09 7:14
mveDave Kreskowiak10-Apr-09 7:14 
GeneralRe: Can’t create New Array. Pin
enipla10-Apr-09 8:36
enipla10-Apr-09 8:36 
GeneralRe: Can’t create New Array. Pin
nlarson1110-Apr-09 10:04
nlarson1110-Apr-09 10:04 
Questionhelp Pin
rajulama10-Apr-09 3:54
rajulama10-Apr-09 3:54 
hi, I am Rana
I am using vb.net to accomplish following task:
1) read a csv file from hard disc
2) display it on DataGridView
3) use the datagridview to update an existing access dataset table which has exactly same number of fileds as input csv file displayed in datagridview
4) add query to the updated datset table
5) exporting the result to a text file

So far I cud only hab done until step 2. I desperately need help on rest of 3 steps. Here is my code:

Code Block:
Imports System.IO
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.OleDb
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If OpenFileDialog1.ShowDialog(Me) = DialogResult.OK Then
Dim fi As New FileInfo(OpenFileDialog1.FileName)
Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Text;Data Source=" & fi.DirectoryName
Dim objConn As New OleDbConnection(sConnectionString)
Dim objDataSet As DataSet = New DataSet()
objConn.Open()
Dim objCmdSelect As New OleDbCommand("SELECT * FROM " & fi.Name, objConn)
Dim objAdapter1 As New OleDbDataAdapter
objAdapter1.SelectCommand = objCmdSelect
objAdapter1.Fill(objDataSet, "test")
DataGridView1.DataSource = objDataSet.Tables(0).DefaultView
objConn.Close()
End If
End Sub
End Class



Please help me on how i can do above three things ASAP.
AnswerRe: help PinPopular
Dave Kreskowiak10-Apr-09 4:25
mveDave Kreskowiak10-Apr-09 4:25 
GeneralRe: help Pin
rajulama10-Apr-09 4:48
rajulama10-Apr-09 4:48 
GeneralRe: help Pin
MidwestLimey10-Apr-09 5:10
professionalMidwestLimey10-Apr-09 5:10 
GeneralRe: help Pin
rajulama10-Apr-09 5:17
rajulama10-Apr-09 5:17 
GeneralRe: help Pin
Jon_Boy10-Apr-09 6:25
Jon_Boy10-Apr-09 6:25 
GeneralRe: help Pin
Dave Kreskowiak10-Apr-09 7:15
mveDave Kreskowiak10-Apr-09 7:15 
GeneralRe: help Pin
EliottA10-Apr-09 13:46
EliottA10-Apr-09 13:46 
GeneralRe: help Pin
rajulama10-Apr-09 18:34
rajulama10-Apr-09 18:34 
GeneralRe: help Pin
Kschuler10-Apr-09 7:50
Kschuler10-Apr-09 7:50 
GeneralRe: help Pin
rajulama10-Apr-09 8:41
rajulama10-Apr-09 8:41 
GeneralRe: help Pin
Kschuler10-Apr-09 8:47
Kschuler10-Apr-09 8:47 
GeneralRe: help Pin
Yusuf10-Apr-09 9:23
Yusuf10-Apr-09 9:23 
QuestionAdding my app's link to Desktop Context Menu Pin
Sumit Prakash Sharma10-Apr-09 1:05
professionalSumit Prakash Sharma10-Apr-09 1:05 
AnswerRe: Adding my app's link to Desktop Context Menu Pin
Jon_Boy10-Apr-09 1:57
Jon_Boy10-Apr-09 1:57 
AnswerRe: Adding my app's link to Desktop Context Menu Pin
Dave Kreskowiak10-Apr-09 3:00
mveDave Kreskowiak10-Apr-09 3:00 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Colin Angus Mackay10-Apr-09 3:12
Colin Angus Mackay10-Apr-09 3:12 
GeneralRe: Adding my app's link to Desktop Context Menu Pin
Jon_Boy10-Apr-09 3:16
Jon_Boy10-Apr-09 3:16 

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.