Adobe 38000827 Administration Guide - Page 20

Memory Variables Creating client variable tables

Page 20 highlights

Creating client variable tables Use the following sample ColdFusion page as a model for creating client variable database tables in your own database. However, keep in mind that not all databases support the same column data type names. For the proper data type, see your database documentation. Tip: The ColdFusion Administrator can create client variable tables for data sources that use bundled JDBC drivers. For more information, see the online Help. Sample table creation page CREATE TABLE CDATA ( cfid char(20), app char(64), data memo ) CREATE UNIQUE INDEX id1 ON CDATA (cfid,app) CREATE TABLE CGLOBAL ( cfid char(20), data memo, lvisit date ) CREATE INDEX id2 ON CGLOBAL (cfid) CREATE INDEX id3 ON CGLOBAL (lvisit) Memory Variables page You use the Memory Variables page of the ColdFusion Administrator to enable application and session variables server-wide. By default, application and session variables are enabled when you install ColdFusion MX. If you disable either type of variable in the Memory Variables page, you cannot use them in a ColdFusion application. 12 Chapter 2 Basic ColdFusion MX Administration

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68

12
Chapter 2
Basic ColdFusion MX Administration
Creating client variable tables
Use the following sample ColdFusion page as a model for creating client variable
database tables in your own database. However, keep in mind that not all databases
support the same column data type names. For the proper data type, see your database
documentation.
Tip:
The ColdFusion Administrator can create client variable tables for data sources that
use bundled JDBC drivers. For more information, see the online Help.
Sample table creation page
<!---- Create the Client variable storage tables in a datasource.
This example applies to Microsoft Access databases --->
<cfquery name="data1" datasource="#DSN#">
CREATE TABLE CDATA
(
cfid char(20),
app char(64),
data memo
)
</cfquery>
<cfquery name="data2" datasource="#DSN#">
CREATE UNIQUE INDEX id1
ON CDATA (cfid,app)
</cfquery>
<cfquery name="global1" datasource="#DSN#">
CREATE TABLE CGLOBAL
(
cfid char(20),
data memo,
lvisit date
)
</cfquery>
<cfquery name="global2" datasource="#DSN#">
CREATE INDEX id2
ON CGLOBAL (cfid)
</cfquery>
<cfquery name="global2" datasource="#DSN#">
CREATE INDEX id3
ON CGLOBAL (lvisit)
</cfquery>
Memory Variables page
You use the Memory Variables page of the ColdFusion Administrator to enable
application and session variables server-wide. By default, application and session variables
are enabled when you install ColdFusion MX. If you disable either type of variable in the
Memory Variables page, you cannot use them in a ColdFusion application.