#22001/5/13 14:33:43
我看了一下Ultradev的帮助,如果需要帮助可以直接联系我zhangweicong@163.net
Creating an OLE DB connection
Creating a direct OLE DB connection can improve the speed of your connection by eliminating the ODBC layer between your Web application and the database. If you don't specify an OLE DB provider for your database, ASP uses the default OLE DB provider for ODBC drivers to communicate with an ODBC driver, which in turn communicates with the database. By using a database-specific OLE DB provider, you eliminate the ODBC middleman.
You can obtain OLE DB providers for Microsoft Access and SQL Server in the Microsoft Data Access Components (MDAC) 2.5 package, which you can download from Microsoft's Web site.
The Oracle Provider for OLE DB is available with Oracle8i Release 2 for Windows. You can also download the provider from Oracle's Web site (registration is required).
In UltraDev, you create an OLE DB connection by including a Provider parameter in a connection string. For example, here are parameters for common OLE DB providers for Access, SQL Server, and Oracle databases, respectively:
Provider=Microsoft.Jet.OLEDB.4.0;...
Provider=SQLOLEDB;...
Provider=OraOLEDB;...
For the parameter value of your OLE DB provider, see your provider vendor's documentation, or consult your system administrator.
To learn more about connection strings, see Writing a connection string.
To create an OLE DB connection:
1 In UltraDev, choose Connections from the Modify menu.
The Connections dialog box appears.
2 Click New and select Custom Connection String from the pop-up menu.
The Custom Connection String dialog box appears.
3 Enter a name for the new connection.
4 Enter a connection string to the database.
5 Specify a Provider parameter for the connection string.
For example, if you have a SQL Server database and the Microsoft OLE DB driver for SQL Server databases is installed on your server, then you would include the following Provider parameter in your connection string:
Provider=SQLOLEDB;...
In this string, SQLOLEDB is the name of the Microsoft OLE DB driver for SQL Server databases.
6 If you want, restrict the number of database items UltraDev retrieves at design time by clicking Advanced and entering a schema or catalog name.
For more information, see Restricting the amount of information.
Note: You cannot create a schema or catalog in Microsoft Access.
7 Click Test.
UltraDev attempts to connect to the database. If the connection fails, double-check the connection string. If the connection still fails, check the URL prefix for the application server (see Specifying a URL prefix).
8 Click OK.
Your new connection should now appear in the Connections dialog box.
9 Click Done to close the Connections dialog box