Quantcast
Channel: ColdFusion Joe
Viewing all articles
Browse latest Browse all 26

ColdFusion CLIENT cookie issue

$
0
0
MSSQL error: The data types text and varchar are incompatible in the equal to operator. In the ColdFusion administrator under there is the option to save CLIENT variables as cookies, in the registry, a datasource or not at all. If the client variables are stored as cookies, it is fairly easy to retrieve and parse to determine things like the identity of a returning user from the cookie. This cookie is called CFCLIENT_<cfapplication name>. If the client variables are stored in the database, it's not so easy. Actually impossible, the cookie variables are NOT stored in the datasource. First to locate the CLIENT variables, which are stored in a table called CDATA. CFGLOBALS client variables are session variables, like CFID, CFTOKEN and timestamp details and are stored in the table CGLOBAL. So what about the error? The data types text and varchar are incompatible in the equal to operator. I ran some queries to try and see if there was some information I could glean from the client variables table. SELECT TOP 1000 [cfid] ,[app] ,[data] FROM [hoton].[dbo].[cdata] where [data] != '' Error: The data types text and varchar are incompatible in the not equal to operator. [data] is a text field permitting nulls. So I checked for null: SELECT TOP 1000 [cfid] ,[app] ,[data] FROM [hoton].[dbo].[cdata] where [data] is null pulled up everything, to test, I ran this: SELECT TOP 1000 [cfid] ,[app] ,[data] FROM [hoton].[dbo].[cdata] where [data] is not null which turned up nothing! So I added a space in the quotes: SELECT TOP 1000 [cfid] ,[app] ,[data] FROM [hoton].[dbo].[cdata] where [data] != '' The data types text and varchar are incompatible in the not equal to operator.
No go! But this worked: SELECT TOP 1000 [cfid] ,[app] ,[data] FROM [hoton].[dbo].[cdata] where [data] not like '' which pulled up what I wanted to look at, but unfortunately could not use. No cookie info is stored in with the datasource client session storage option in the ColdFusion administrator.

Viewing all articles
Browse latest Browse all 26

Trending Articles