108
The Database Connectivity API
The UltraDev 4 ColdFusion include file should be named MyConnection1.cfm, where
MyConnection1 is the name of your connection. The following example shows the include
file for a ColdFusion connection to a product table:
<!-- FileName="Connection_cf_dsn.htm" "dsn=products" -->
<!-- Type="ADO" -->
<!-- Catalog="" -->
<!-- Schema="" -->
<!-- HTTP="false" -->
<CFSET MM_MyConnection1_DSN
= "products">
<CFSET MM_MyConnection1_USERNAME
= "">
<CFSET MM_Product_USERNAME
= "">
<CFSET MM_MyConnection1_PASSWORD
= "">
The server behavior file includes this connection by using the
cfinclude
statement, as shown
in the following example:
<cfinclude template="Connections/MyConnection1.cfm">
JSP
The JSP include file should be named MyConnection1.jsp, where MyConnection1 is the
name of your connection. The following example is the include file for a JDBC connection to
a database:
<%
// Filename="Connection_jdbc_conn1.htm"
// Type="JDBC"
// HTTP="false"
// Catalog=""
// Schema=""
String MM_MyConnection1_DRIVER
= "com.inet.tds.TdsDriver";
String MM_MyConnection1_USERNAME
= "testadmin";
String MM_MyConnection1_PASSWORD
= "velcro";
String MM_MyConnection1_URL
= "jdbc:server:test-
3:1433?database=pubs";
%>
The server behavior file includes this connection by using the relative file include statement,
as shown in the following example:
<%@ include file="Connections/MyConnection1.jsp" %>
000_DW_API_Print.book Page 108 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...