Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2004, 07:44 PM
Registered User
 
Join Date: Oct 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shieldsteven Send a message via Yahoo to shieldsteven
Default inserting into database

hi all
does any one know how to connect and upload an excel file to a vb.net data grid? i am not using sql server or a web application. i have excel 11.5612.5606 or thats wat it says on the about excel option.
the code that i have so far is exactly

    Dim strconnection As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\documents and settings\shields\mydocuments\adminigraphics_backup \book1.xls; Extended Properties=Excel 11.5612.5606;"
        Dim conn As New OleDb.OleDbConnection(strconnection)
        conn.Open()
        Dim objCmdSelect As New OleDbCommand("SELECT * FROM myRange1", conn)
        Dim objAdapter1 As New OleDbDataAdapter
        objAdapter1.SelectCommand = objCmdSelect
        Dim objDataset1 As New DataSet
        objAdapter1.Fill(objDataset1, "XLData")

        dbg1.DataSource = objDataset1.Tables(0).DefaultView

as you can see, i do open the connection but when i compile the program and run it, it gives me a connection.dll error and shows that the error is in conn.open.
can any one explain what my problem is?

stephen daniel shields





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in inserting to Database?? Hannibal Pro JSP 0 March 14th, 2006 07:11 AM
Inserting into a database jroxit Classic ASP Basics 1 January 2nd, 2006 06:04 PM
inserting into database shieldsteven VS.NET 2002/2003 8 October 20th, 2004 05:33 PM
Inserting into database ZiqXx C# 6 July 5th, 2004 04:13 AM
Inserting VBNullChar into a database ipclogistics SQL Language 1 June 11th, 2004 10:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.