Using ADO with Scripting Languages
Within a scripting environment, ADO allows you to expose data by way of server-side scripting. In this scenario, ADO, the underlying OLE DB provider that it utilizes, and any other components needed to reference a given data store are installed on a server running Internet Information Services (IIS). Using Active Server Pages (ASP), ADO is a component referenced in a script that can generate HTML, for example. This HTML content can be passed via HTTP to a client Web browser. Through the use of scripting, the Web page can send actions back to the server-side script, allowing you to update, traverse, or view specific data.
Before you use an ActiveX object in a web page, it is important to know whether the object is safe for scripting. When an object is considered safe for scripting, it means that the control cannot take any harmful action on the user's computer and therefore can be executed without requesting the user's approval. The following table lists the ADO objects and indicates whether or not they are safe for scripting.
Object | Safe for Scripting? |
---|---|
ADO Connection | Yes |
ADO Command | No |
ADO Parameter | No |
ADO Recordset | Yes |
ADO Record | Yes |
ADO Stream | Yes |
ADO Error | No |
ADOX Catalog | No |
ADOX CellSet | No |
RDS DataControl | Yes |
RDS DataSpace | Yes |
RDS DataFactory | No |
The following table lists the providers shipped with MDAC and indicates whether or not they are safe for scripting.
Provider | Safe for Scripting? |
---|---|
Shape | Yes |
Persist | Yes |
Remote | Yes |
OLE DB Provider for SQL Server (SQLOLEDB) | No |
OLE DB Provider for ODBC (MSDASQL) | No |
ODBC Data Sources
One notable difference between scripting and non-scripting ADO code is the ODBC Data Source, if used. For non-scripting applications, you can create a User DSN in the ODBC Data Source Administrator. For scripts that are running under IIS, you must create a System DSN; otherwise your scripts won't recognize the data source you created. This applies to any ADO scripting application using the Microsoft OLE DB Provider for ODBC through Microsoft IIS.
Referencing the ADO Library
N/A with scripting languages.
Handling events
N/A with scripting languages.
The following topics contain more specific information about using ADO with scripting languages:
See Also
ActiveX Data Objects Start Page | Using ADO with Microsoft Visual Basic | Using ADO with Microsoft Visual C++ | Using ADO with Microsoft Visual J++