How to upload and download excel file into server

G

Guest

Hi,
can u explain to me what is the path need to use in order to upload and
download the file based on below solution:
1.Set up a folder that both the web app and SQL server can get to.
2.Do a simple file upload from the web app

what is DTS package and how to apply it?
3.Set up a DTS package to periodically check the folder to do an import.

Your help will be appreciated.

thank you.

best regards,
GL
 
P

Paul Clement

¤ Hi,
¤ can u explain to me what is the path need to use in order to upload and
¤ download the file based on below solution:
¤ 1.Set up a folder that both the web app and SQL server can get to.

I don't believe that SQL Server needs access to the path. Just upload the file to a folder. Can you
do this or do you have a specific question about this process.

¤ 2.Do a simple file upload from the web app
¤

I believe this question was answered in your prior post. Are you having problems with the upload
code?

¤ what is DTS package and how to apply it?
¤ 3.Set up a DTS package to periodically check the folder to do an import.
¤

AFAIK, DTS packages don't have this type of capability. You can write code to script a DTS package
but DTS cannot check folders.

You can also use SQL (although I don't know the specifics concerning your import).

Dim ExcelConnection As New
System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & "E:\My
Documents\Book5.xls" & ";" & _
"Extended Properties=""Excel
8.0;HDR=No""")

ExcelConnection.Open()

'Existing table
Dim ExcelCommand As New System.Data.OleDb.OleDbCommand("INSERT INTO [ODBC;Driver={SQL
Server};Server=(local);Database=Northwind;Trusted_Connection=yes].[Orders2] SELECT * FROM
[Orders$];", ExcelConnection)
'New table
'Dim ExcelCommand As New System.Data.OleDb.OleDbCommand("SELECT INTO [ODBC;Driver={SQL
Server};Server=(local);Database=Northwind;Trusted_Connection=yes].[Orders2] FROM [Orders$];",
ExcelConnection)

ExcelCommand.ExecuteNonQuery()
ExcelConnection.Close()


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top