home *** CD-ROM | disk | FTP | other *** search
ColdFusion Markup Language | 2001-09-14 | 989 b | 30 lines |
- <HTML>
- <HEAD>
- <TITLE>AdvDSN Component</TITLE>
- </HEAD>
-
- <BODY>
- <cfobject class="AdvDSN.DSN" action="CREATE" name="AdvDSN">
- <cfset strDriver = "Microsoft Access Driver (*.mdb)">
- <cfset strDSN = "DSN=" & #Form.Name# & "\0Description=" & #Form.Description#>
- <cfset strDSN = strDSN & "\0DBQ=" & #Form.File# & "\0User=" & #Form.User#>
- <cfset strDSN = strDSN & "\0Pwd=" & #Form.Password# & "\0\0">
- <!--
- 'SQL
- 'strDriver = "SQL Server"
- 'strDSN = "DSN=testingsql\0Description=New SQL Server Data Source\0Server=(local)\0DATABASE=pubs\0\0"
-
- 'Excel
- 'strDriver = "Microsoft Excel Driver (*.xls)"
- 'strDSN = "DSN=testingexcel\0Description=New Excel Data Source\0FileType=Excel\0DBQ=C:\EXCELDIR\odbc.xls\0MaxScanRows=20\0\0"
- -->
- <cfset temp = AdvDSN.Configure(strDriver, strDSN)>
- <cfif AdvDSN.IsError Eq 1>
- <cfoutput>#AdvDSN.ErrorReason#</cfoutput> <br>
- <cfelse>
- <cfoutput>Configured successfully</cfoutput> <br>
- </cfif>
- <a href="dsp_configure.htm">Back</a>
- </BODY>
- </HTML>
-