![MACROMEDIA DREAMWEAVER MX 2004-DREAMWEAVER API Скачать руководство пользователя страница 82](http://html1.mh-extra.com/html/macromedia/dreamweaver-mx-2004-dreamweaver-api/dreamweaver-mx-2004-dreamweaver-api_reference_3336554082.webp)
82
Chapter 7: The Database API
Example
The code
var connectionString = MMDB.getConnectionString ("EmpDB")
returns different
strings for an ADO or JDBC connection.
•
For an ADO connection, the following string can return:
"dsn=EmpDB;uid=;pwd=";
•
For a JDBC connection, the following string can return:
"jdbc:inetdae:192.168.64.49:1433?database=pubs&user=JoeUser&¬
password=joesSecret"
MMDB.getDriverName()
Availability
Dreamweaver UltraDev 1.
Description
This function gets the driver name that is associated with the specified connection. Only a JDBC
connection has a driver name.
Arguments
connName
•
The
connName
argument is a connection name that is specified in the Connection Manager. It
identifies the connection string that Dreamweaver should use to make a database connection
to a live data source.
Returns
A string that contains the driver name.
Example
The statement
MMDB.getDriverName ("EmpDB");
might return the following string:
"jdbc/oracle/driver/JdbcOracle"
MMDB.getDriverUrlTemplateList() (deprecated)
Availability
Dreamweaver UltraDev 4, deprecated in Dreamweaver MX.
Note:
For Dreamweaver UltraDev 4, the list of JDBC drivers are stored in the connections.xml file,
which is located in the Configuration/Connections folder. Each driver has an associated URL
template. This function returns the list of JDBC drivers.
For Dreamweaver MX (or later), these drivers and URL templates are hard-coded in the JDBC
dialog boxes. In addition, this function is an empty function definition to eliminate undefined-
function errors. The following example shows how a JDBC driver and URL template are hard-
coded:
var DEFAULT_DRIVER = "COM.ibm.db2.jdbc.app.DB2Driver";
var DEFAULT_TEMPLATE = "jdbc:db2:[database name]";
Dreamweaver has a dialog box for each driver/URL template pair.
000_DW_API_Print.book Page 82 Wednesday, August 20, 2003 9:14 AM
Содержание DREAMWEAVER MX 2004-DREAMWEAVER API
Страница 1: ...Dreamweaver API Reference...
Страница 24: ...24 Contents...
Страница 32: ......
Страница 70: ...70 Chapter 5 Fireworks Integration...
Страница 76: ...76 Chapter 6 Flash Integration...
Страница 116: ...116 Chapter 9 The JavaBeans API...
Страница 140: ......
Страница 152: ...152 Chapter 11 Application...
Страница 218: ...218 Chapter 12 Workspace...
Страница 248: ...248 Chapter 13 Site...
Страница 292: ...292 Chapter 14 Document...
Страница 378: ...378 Chapter 17 Design...
Страница 430: ...430 Chapter 18 Code...
Страница 486: ...486 Index...