home *** CD-ROM | disk | FTP | other *** search
/ Internet Pratica / IPRAT_01.iso / ASP / ASPFusion_Basic_Suite / examples / asp / advdsn / act_remove.asp < prev    next >
Encoding:
Text File  |  2001-09-14  |  810 b   |  33 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>AdvDSN Component</TITLE>
  4. </HEAD>
  5.  
  6. <BODY>
  7.  
  8. <%
  9. Dim AdvDSN, strDriver, strDSN
  10. Set AdvDSN = Server.CreateObject("AdvDSN.DSN")
  11. 'Access
  12. strDriver = "Microsoft Access Driver (*.mdb)"
  13. strDSN = "DSN=" & Request.Form("Name") & "\0\0"
  14.  
  15. 'SQL
  16. 'strDriver = "SQL Server"
  17. 'strDSN = "DSN=testingsql\0Description=New SQL Server Data Source\0Server=(local)\0DATABASE=pubs\0\0"
  18.  
  19. 'Excel
  20. 'strDriver = "Microsoft Excel Driver (*.xls)"
  21. 'strDSN = "DSN=testingexcel\0Description=New Excel Data Source\0FileType=Excel\0DBQ=C:\EXCELDIR\odbc.xls\0MaxScanRows=20\0\0"
  22.  
  23. AdvDSN.Remove strDriver, strDSN
  24. if (AdvDSN.IsError = 1) then
  25.     Response.Write AdvDSN.ErrorReason & "<br>"
  26. else
  27.     Response.Write "Removed successfully" & "<br>"
  28. end if
  29. %>
  30. <a href="dsp_remove.htm">Back</a>
  31. </BODY>
  32. </HTML>
  33.