The reasons for this are not important, but I need to get the result
of the following query into a cookie:
BEGIN TRANSACTION
UPDATE LinkShareMaxID SET LinkShareUID = LinkShareUID + 1
SELECT LinkShareUID FROM LinkShareMaxID
COMMIT TRANSACTION
The results of
The results of the query (I thought) return a simple integer, but I
get the following error message:
Complex object types cannot be converted to simple values.
I think it would return a resultset that should be captured by cfprocresult as
a query object.
what's the code you're using to create the cookie?
if you're trying to dump the whole query object into a cookie, won't
work. regardless of whether or not there's only 1 record/1 column
returned, a query is still a complex object.
On 10/7/05, Rob Redford [EMAIL PROTECTED] wrote:
The reasons
You need to take the result set from the query and serialize it using
CF2WDDX and stick the serialized packet in the value of the cookie (you'll
need to use WDDX2CF to de-serialize and read it later). Note that there are
limits to how much data you can stuff in a cookieso if it's more than
I was trying to dump the whole query in, since it only returns a
single record with a single field. What's the best way to handle it
in that case?
On 10/7/05, Charlie Griefer [EMAIL PROTECTED] wrote:
what's the code you're using to create the cookie?
if you're trying to dump the whole query
I was trying to dump the whole query in, since it only returns a
single record with a single field. What's the best way to handle it
in that case?
see my posting...trust me ;-)
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
Modern browsers should support 4k worth of data in a cookie - i.e. about
4096 characters. There is also a limit on the number of cookies you can
set - something around 20 per domain. It is a good idea to store as little
information in a cookie as possible. WDDX is a quick solution to your
problem,
Cookies can only contain strings, dates, booleans and the like. If you're
trying to dump the entire query into a COOKIE then it's no go.
Also, I just tested it and I don't believe that an UPDATE query even RETURNS
results. It just runs and does it's thing.
!//--
andy matthews
WDDX is a quick solution to your
problem, but WDDX is verbose.
Yep...it's a huge waste of space alrightmore verbose than XML!!
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail:
OK...I read the posting, but I'm relatively new to this and I'm not
sure how to adapt the CF docs example for what I need. Can you give me
an example?
On 10/7/05, Bryan Stevenson [EMAIL PROTECTED] wrote:
I was trying to dump the whole query in, since it only returns a
single record with a
Never mind. Didn't see the SELECT portion of that query.
!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Friday, October 07, 2005 1:26
I tried this and it doesn't work, but am I even on the right track?
cfquery datasource=um name=idQuery
BEGIN TRANSACTION
UPDATE LinkShareMaxID SET LinkShareUID = LinkShareUID +
1
SELECT LinkShareUID FROM LinkShareMaxID
SEARIALIZE:
cfwddx action=cfml2wddx input=#YourQuery# output=#CookieVal#
STICK IN COOKIE
cfcookie name=MyCookie value=#CookieVal#
DESERIALIZE
cfwddx action=wddx2cfml input=#Cookie.MyCookie# output=YourQueryName
Ta daand sorry about thje wrong names for WDDX stuff...it's a tag and
not a set
you'll see the error of yer ways in my previous replyquery names with
poiund signs as they are variables etc.just the syntax messing you up.
Cheers
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell:
I tried this and it doesn't work, but am I even on the right track?
cfquery datasource=um name=idQuery
BEGIN TRANSACTION
UPDATE LinkShareMaxID SET LinkShareUID = LinkShareUID +
1
SELECT LinkShareUID FROM LinkShareMaxID
do you just need the value of LinkShareUID?
if that's the case, then:
cfcookie name=myCookie value=#idQuery.linkShareUID#
On 10/7/05, Bryan Stevenson [EMAIL PROTECTED] wrote:
you'll see the error of yer ways in my previous replyquery names with
poiund signs as they are variables
So far, nothing works and I continue to get the same exact error.
This is the code I used, and you can also see we are trying to read
this value from the cookie and then insert it into a different DB
table. If someone has a better way, I'm all ears. We're using CFMX
6.1, by the way.
Still requiring the use of WDDX, though?
On 10/7/05, Charlie Griefer [EMAIL PROTECTED] wrote:
do you just need the value of LinkShareUID?
if that's the case, then:
cfcookie name=myCookie value=#idQuery.linkShareUID#
On 10/7/05, Bryan Stevenson [EMAIL PROTECTED] wrote:
you'll see the
no.
WDDX serializes a complex object (such a query, array, struct) into a
string representation (e.g. simple value) that can be stored in a
database or text file (cookie).
If all you need is the value of LinkShareUID from the myQuery query,
and there's just the 1 record returned... then all you
you can't use a query object as a value in an INSERT query
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
Still requiring the use of WDDX, though?
No because it would only be a simple data type if only using the column
value
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL
Problem solved, thanks! Part of my problem was I'm forced to use a
remote manager that wasn't refreshing the files when saved on the
local machine, so my broken copy kept being uploaded rather than with
changes suggested by everyone who replied. I probably just learned 3
or 4 techniques to do it
LOL...better stick with that Horse Whisperer gig ;-) (sorry...I held off as
long as I could...but it's Friday) ;-)
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
It doesn't pay as well and doesn't smell as good either :)
On 10/7/05, Bryan Stevenson [EMAIL PROTECTED] wrote:
LOL...better stick with that Horse Whisperer gig ;-) (sorry...I held off as
long as I could...but it's Friday) ;-)
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
24 matches
Mail list logo