Source Code
for http://194.8.136.102/iisdev/odbc/excel.asp
COLOR LEGEND
|
Server Side Script |
|
Client Side Script |
|
Hyperlink |
|
Include |
|
Frames |
|
Comments |
|
Object Code Link |
|
Standard HTML and Text |
<% @LANGUAGE=VBSCRIPT %>
<% Option Explicit %>
<HTML>
<HEAD>
<META NAME="generator" CONTENT="Allaire HomeSite 4.0">
<TITLE>ODBC Excel @softwing.com</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<%
Dim xObj, strDriver, strDSN, retval
Set xObj = Server.CreateObject("Softwing.OdbcRegTool")
strDriver = "Microsoft Excel Driver (*.xls)"
strDSN = "DSN=New Excel Data Source" & vbNullChar & "Description=New Excel Data Source" & vbNullChar
strDSN = strDSN & "FileType=Excel" & vbNullChar & "DBQ=C:\EXCELDIR\odbc.xls" & vbNullChar
strDSN = strDSN & "MaxScanRows=20" & vbNullChar & vbNullChar
retval = xObj.CreateDSN(strDriver, strDSN)
If retval = True then Response.Write "DSN Creation successful." else Response.Write "DSN Creation failed."
%>
</BODY>
</HTML>