Home Site Map Buy Email
AdvSMTP
AdvIMAP4
AdvPOP3
AdvFile
AdvZIP
AdvGraphGenerator
AdvLDAP
AdvHTTP
AdvDSN
AdvDirectory
AdvRegistry
AdvMX
ASP Components >> AdvDSN
Download | Buy
AdvDSN

The component allows you to add or delete ODBC Datasource Names. Works with all ODBC supported databases. Including MS-SQL Server, MS-Access, Oracle, and MySQL ODBC drivers. Complete DSN management. Access to the component can also be turned on or off for any website on the server, thus making it ideal for shared hosting environment. The component is very easy to use and very flexible for DSN management. It supports complete basic DSN management operations, such as Add, Configure and Remove a DSN.


Sample code for C++, ASP and CF is provided with the component

Example (ASP):

<% set Obj = Server.CreateObject("AdvDSN.DSN") %>

Example (ColdFusion):

<CFOBJECT Class="AdvDSN.DSN" Action="Create" Name="Obj">

AdvDSN Properties

Property Description
ErrorReason Reports any error that occurred during the request.

Example (ASP):
<% if Obj.IsError = 1 then
        Response.Write Obj.ErrorReason
else
        No Error Occurred
end if %>

Example (ColdFusion):
<CFIF #Obj.IsError# EQ 1>
        <CFOUTPUT>#Obj.ErrorReason#</CFOUTPUT>
<CFELSE>
        <CFOUTPUT>No Error Occurred</CFOUTPUT>
</CFIF>
IsError Returns 1 if any error occurred during the request otherwise 0.

Example (ASP):
<% if Obj.IsError = 1 then
        Response.Write Obj.ErrorReason
else
        No Error Occurred
end if %>

Example (ColdFusion):
<CFIF #Obj.IsError# EQ 1>
        <CFOUTPUT>#Obj.ErrorReason#</CFOUTPUT>
<CFELSE>
        <CFOUTPUT>No Error Occurred</CFOUTPUT>
</CFIF>

AdvDSN Methods

Method Parameter Return Value Description
Add 1. DSN Driver String
2. DSN Connection String
None Add a DSN.

Example (ASP):
<% Obj.Add "Microsoft Access Driver(*.mdb)","DSN=test\0Description=this is test DSN\0\0" %>

Example (ColdFusion):
<CFSET Obj.Add("Microsoft Access Driver (*.mdb)", "DSN=test\0Description=this is test DSN\0\0")>
Configure 1. DSN Driver String
2. DSN Connection String
None Configure an existing DSN.

Example (ASP):
<% Obj.Configure "Microsoft Access Driver(*.mdb)","DSN=test\0Description=this is test DSN\0\0" %>

Example (ColdFusion):
<CFSET Obj.Configure("Microsoft Access Driver (*.mdb)", "DSN=test\0Description=this is test DSN\0\0")>
Remove 1. DSN Driver String
2. DSN Connection String
None Remove an existing DSN.

Example (ASP):
<% Obj.Remove "Microsoft Access Driver (*.mdb)", "DSN=test\0\0" %>

Example (ColdFusion):
<CFSET Obj.Remove("Microsoft Access Driver (*.mdb)", "DSN=test\0\0")>