PDA

View Full Version : 【 】 ASP ASP reading excel database linkage Pr


5641f4mvoo
05-30-2011, 09:54 PM
MS 's direction of reading the OLEDB patronize to the database data in EXCEL ,New Lacoste Trainers High Top (http://www.buylacostetrainers.com/new-lacoste-trainers-high-top-c-516.html), so you can easily way data from excel ,Womens Lacoste Arin Trainers (http://www.buylacostetrainers.com/womens-lacoste-arin-trainers-c-508_510.html), yet one thing to note , to read data from excel , you can not execute the way to use reading, but must Open the way to use to read
routine :
obscure ConnExcel, sql, R######cel, ExcelFile
ExcelFile =
ConnExcel = ConnectToExcel (ExcelFile) ' Note namely the chart name have to be the following side this format test
Sql =
Set R######cel = Server.CreateObject (
'ASP perusing excel file,Lacoste Arixia FD Trainers (http://www.buylacostetrainers.com/lacoste-arixia-fd-trainers-c-493.html), use the open usage ,Lacoste Protect Laser Trainers (http://www.buylacostetrainers.com/lacoste-protect-laser-trainers-c-503.html), which tin no execute usage to be wrong with the execute
R######cel.open Sql, ConnExcel,Lacoste Radiate Croc Trainers (http://www.buylacostetrainers.com/lacoste-radiate-croc-trainers-c-504.html), 1,3
IF R######cel.Eof And R######cel.Bof Then
Response.write
Else
Do While Not R######cel.EOF
Response.jot R######cel (0)
R######cel.MoveNext
Loop
End IF
R######cel.Close
Set R######cel = nothing
Function ConnectToExcel (FileName)
Dim ConnName, ConnStr,Lacoste Carnaby Trainers (http://www.buylacostetrainers.com/lacoste-carnaby-trainers-c-495.html), Rs
' create Connection object
Set ConnName = Server.CreateObject (
'ConnStr =
'ConnStr =
ConnStr =
' shriek the Open method to open the database
ConnName.Provider =
ConnName.ConnectionString = ConnStr
ConnName.Open
set ConnectToExcel = ConnName
Set ConnName = naught
End Function