Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Import from Excel into database using jet in VB.net

I can import data from Excel to a non protected access database using the
code below.
How can I amend the code to import the data into the password protected
database myDatabase ?

Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
source=myExcelFile;Extended Properties='Excel 8.0;HDR=YES;'"
Comm.CommandType = CommandType.Text
Comm.CommandText = "SELECT * INTO tblNEW IN 'myDatabase' FROM [Sheet1$]'
Comm.Connection = Conn
Conn.Open()
Comm.ExecuteNonQuery()
Conn.Close
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Database query to import from Access to Excel David T Excel Discussion (Misc queries) 0 August 31st 06 07:12 PM
Using Excel for MySQL database import inspireme Excel Discussion (Misc queries) 1 January 6th 06 10:59 PM
import paradox database into excel fange Excel Discussion (Misc queries) 1 August 19th 05 03:20 PM
Import from Database using field from excel. BD Excel Discussion (Misc queries) 1 May 10th 05 10:31 PM


All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"