Click here to Skip to main content
16,015,258 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: register .dll mutiple time Pin
Dave Kreskowiak30-Apr-04 8:33
mveDave Kreskowiak30-Apr-04 8:33 
GeneralRe: register .dll mutiple time Pin
vancouver7777-May-04 14:29
vancouver7777-May-04 14:29 
Generalfastest way to copy a table to a new table Pin
hounetdev30-Apr-04 5:26
hounetdev30-Apr-04 5:26 
GeneralRe: fastest way to copy a table to a new table Pin
Dave Kreskowiak30-Apr-04 8:29
mveDave Kreskowiak30-Apr-04 8:29 
GeneralRe: fastest way to copy a table to a new table Pin
Randy S30-Apr-04 17:22
Randy S30-Apr-04 17:22 
Generalreplacing color of an image pixel by pixel Pin
Member 41696030-Apr-04 4:37
Member 41696030-Apr-04 4:37 
GeneralRe: replacing color of an image pixel by pixel Pin
Terry O'Nolley30-Apr-04 18:02
Terry O'Nolley30-Apr-04 18:02 
QuestionLoad data from a datgrid into SQL Server table? Pin
Anonymous30-Apr-04 3:03
Anonymous30-Apr-04 3:03 
I have a program that loads a excel spreadsheet into a datagrid on my form. I now want to take that same information and load it to a SQL Server table from the datgrid. Is this possible?

here is what i am doing so far:

Dim a As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=c:\supplier requirements.xls;" _
& "Extended Properties=Excel 8.0;"

' Create the connection object by using the preceding connection string.
Dim objConn As New OleDbConnection(a)
' Open connection with the database.
objConn.Open()
' The code to follow uses a SQL SELECT command to display the data from the worksheet.
' Create new OleDbCommand to return data from worksheet.
Dim objCmdSelect As New OleDbCommand("Select * from [supplier requirements$]", objConn)
' Create new OleDbDataAdapter that is used to build a DataSet
' based on the preceding SQL SELECT statement.
Dim objAdapter As New OleDbDataAdapter()
' Pass the Select command to the adapter.
objAdapter.SelectCommand = objCmdSelect
' Create new DataSet to hold information from the worksheet.
Dim objDataset As New DataSet()
' Fill the DataSet with the information from the worksheet.


objAdapter.Fill(objDataset, "XLData")
' Build a table from the original data.
DataGrid1.DataSource = objDataset.Tables(0).DefaultView

Generaldisconnected programming environments Pin
Member 104068830-Apr-04 1:26
Member 104068830-Apr-04 1:26 
GeneralRe: disconnected programming environments Pin
Dave Kreskowiak30-Apr-04 2:59
mveDave Kreskowiak30-Apr-04 2:59 
GeneralRe: disconnected programming environments Pin
Member 10406882-May-04 20:14
Member 10406882-May-04 20:14 
GeneralC++ dll calling from Vb Pin
Shenthil29-Apr-04 19:51
Shenthil29-Apr-04 19:51 
GeneralRe: C++ dll calling from Vb Pin
Hesham Amin29-Apr-04 22:28
Hesham Amin29-Apr-04 22:28 
GeneralRe: C++ dll calling from Vb Pin
f6430-Apr-04 13:23
f6430-Apr-04 13:23 
GeneralRe: C++ dll calling from Vb Pin
Shenthil3-May-04 19:07
Shenthil3-May-04 19:07 
GeneralRe: C++ dll calling from Vb Pin
Shenthil3-May-04 23:01
Shenthil3-May-04 23:01 
GeneralRe: C++ dll calling from Vb Pin
f644-May-04 5:46
f644-May-04 5:46 
GeneralSending Textbox Entry to the Printer Pin
alex120529-Apr-04 17:29
alex120529-Apr-04 17:29 
GeneralRe: Sending Textbox Entry to the Printer Pin
Dave Kreskowiak30-Apr-04 3:09
mveDave Kreskowiak30-Apr-04 3:09 
GeneralRe: Sending Textbox Entry to the Printer Pin
alex12052-May-04 14:54
alex12052-May-04 14:54 
GeneralParsing XML with VBScript Pin
lnong29-Apr-04 12:03
lnong29-Apr-04 12:03 
GeneralOLE objects in PowerPoint slideshow mode Pin
pnyr29-Apr-04 5:23
pnyr29-Apr-04 5:23 
GeneralStressing Out and Forgetting the Basics Pin
LaptopBoy31129-Apr-04 3:06
LaptopBoy31129-Apr-04 3:06 
GeneralRe: Stressing Out and Forgetting the Basics Pin
Mike Ellison29-Apr-04 3:33
Mike Ellison29-Apr-04 3:33 
GeneralRe: Stressing Out and Forgetting the Basics Pin
LaptopBoy31129-Apr-04 3:50
LaptopBoy31129-Apr-04 3:50 

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.