Click here to Skip to main content
15,923,557 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to access MS excel data in VB.Net? Pin
ajay5888611-Feb-07 23:46
ajay5888611-Feb-07 23:46 
AnswerRe: How to access MS excel data in VB.Net? Pin
andyharman12-Feb-07 4:30
professionalandyharman12-Feb-07 4:30 
AnswerRe: How to access MS excel data in VB.Net? Pin
Hamid_RT12-Feb-07 18:39
Hamid_RT12-Feb-07 18:39 
GeneralRe: How to access MS excel data in VB.Net? Pin
ajay5888612-Feb-07 19:32
ajay5888612-Feb-07 19:32 
GeneralRe: How to access MS excel data in VB.Net? Pin
Hamid_RT12-Feb-07 19:44
Hamid_RT12-Feb-07 19:44 
AnswerRe: How to access MS excel data in VB.Net? Pin
Marcus J. Smith14-Feb-07 4:05
professionalMarcus J. Smith14-Feb-07 4:05 
QuestionData providers List in combo box Pin
salaikumar11-Feb-07 23:41
salaikumar11-Feb-07 23:41 
AnswerRe: Data providers List in combo box Pin
ajay5888612-Feb-07 0:18
ajay5888612-Feb-07 0:18 
Imports System.Data.SqlClient
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

' Creating connection and command sting
Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb"
Dim sqlStr As String = "SELECT * FROM Employees"
' Create connection object
Dim conn As OleDbConnection = New OleDbConnection(conStr)
' Create data adapter object
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds As DataSet = New DataSet
da.Fill(ds, "Employees")
' Attach dataset's DefaultView to the datagrid control
DataGrid1.DataSource = ds.DefaultViewManager
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
' Creating connection and command sting
Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb"
Dim sqlStr As String = "SELECT * FROM Employees"
' Create connection object
Dim conn As OleDbConnection = New OleDbConnection(conStr)
' Create data adapter object
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds As DataSet = New DataSet
da.Fill(ds, "Employees")
' Attach dataset's DefaultView to the datagrid control
Dim dv As DataView = ds.Tables("Employees").DefaultView
ListBox1.DataSource = dv
ListBox1.DisplayMember = "FirstName"
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
' Creating connection and command sting
Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=c:\\northwind.mdb"
Dim sqlStr As String = "SELECT * FROM Employees"
' Create connection object
Dim conn As OleDbConnection = New OleDbConnection(conStr)
' Create data adapter object
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds As DataSet = New DataSet
da.Fill(ds, "Employees")
' Attach dataset's DefaultView to the datagrid control
Dim dv As DataView = ds.Tables("Employees").DefaultView
ComboBox1.DataSource = dv
ComboBox1.DisplayMember = "FirstName"
End Sub
Roll eyes | :rolleyes: BYE

Imagine the I.T

QuestionDoes crystal report v11 can integrate with vs.net 2005 standard edition Pin
Mekong River11-Feb-07 22:58
Mekong River11-Feb-07 22:58 
QuestionWeb Browser control help Needed Pin
sandipan.neogi@gmail.com11-Feb-07 22:36
sandipan.neogi@gmail.com11-Feb-07 22:36 
AnswerRe: Web Browser control help Needed Pin
Christian Graus11-Feb-07 23:35
protectorChristian Graus11-Feb-07 23:35 
Questionwhich function is used for round the image from the shimgvw.dll Pin
Marius92611-Feb-07 21:54
Marius92611-Feb-07 21:54 
AnswerRe: which function is used for round the image from the shimgvw.dll Pin
Christian Graus11-Feb-07 22:09
protectorChristian Graus11-Feb-07 22:09 
Questionstill having problem in recording voice Pin
siva50311-Feb-07 21:21
siva50311-Feb-07 21:21 
AnswerRe: still having problem in recording voice Pin
Dave Kreskowiak12-Feb-07 4:56
mveDave Kreskowiak12-Feb-07 4:56 
GeneralRe: still having problem in recording voice Pin
siva50314-Feb-07 19:31
siva50314-Feb-07 19:31 
QuestionEvents & Delegates in VB question Pin
bertvan11-Feb-07 21:17
bertvan11-Feb-07 21:17 
AnswerRe: Events & Delegates in VB question Pin
_mubashir11-Feb-07 22:29
_mubashir11-Feb-07 22:29 
GeneralRe: Events & Delegates in VB question Pin
bertvan12-Feb-07 1:43
bertvan12-Feb-07 1:43 
GeneralRe: Events & Delegates in VB question Pin
Dave Doknjas12-Feb-07 13:21
Dave Doknjas12-Feb-07 13:21 
Questionclass library Pin
dalbhide bipin11-Feb-07 21:05
dalbhide bipin11-Feb-07 21:05 
AnswerRe: class library Pin
Dave Kreskowiak12-Feb-07 4:53
mveDave Kreskowiak12-Feb-07 4:53 
Questionthe value of comboBox like the dataGrid's key value Pin
costavo11-Feb-07 20:50
costavo11-Feb-07 20:50 
AnswerRe: the value of comboBox like the dataGrid's key value Pin
bertvan11-Feb-07 21:27
bertvan11-Feb-07 21:27 
Generalthe value of comboBox like the dataGrid's key value Pin
costavo11-Feb-07 22:21
costavo11-Feb-07 22:21 

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.