Here's the answer to the question posed in thread <a 
href="http://www.houseoffusion.com/cf_lists/index.cfm?method=reply&forumid=4&threadid=20897&messagecounter=105607";>Client
 Variable Problem on Oracle (aka CGLOBAL and CDATA client variables)</a>

ColdFusion works differently for client variables on Oracle than client variables on 
mysql.  Regardless of whether your oracle data source is odbc, jdbc oci, or native, 
ColdFusion rpads the cfid and app columns with spaces, out to a 64 characters.  So the 
cfid and app columns have to be defined as either varchar2(64) or char(64).  The 
cglobal cfid column also has to be a length of 64.  This differs from most of the 
online help I could find where they usually recommend char(20) for CFID.  In addition, 
the DATA column cannot be a CLOB.  The data is not read parsed properly if it is.  The 
DATA column works if it is a VARCHAR2.  I made mine a length of 4000, the maximum.

Mysql has none of these restrictions.  The columns are not rpadded with spaces and the 
data column can be 'text' (large strings).

SQL> desc cdata
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 CFID                                               VARCHAR2(64)
 APP                                                VARCHAR2(64)
 DATA                                               VARCHAR2(4000)

SQL> desc cglobal
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 CFID                                               VARCHAR2(64)
 DATA                                               VARCHAR2(2000)
 LVISIT                                             DATE

This will also solve ORA-0001 problems people are having on Oracle.  I only didn't hit 
ORA-0001 because I didn't yet have any indexes defined.  It looks like it would make 
sense to create a unique index on CGLOBAL.CFID and on CDATA (CFID, APP), as these are 
the columns used in the where clauses.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to