|
Home > Archive > Commerce Server General > September 2004 > Saving Binary Value to OrderForm
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Saving Binary Value to OrderForm
|
|
| Justin 2004-08-27, 6:07 pm |
| Greetings all,
I'm attempting to add a binary value to the OrderForm collection using the
SetPropertyOnOrderForms method of the Basket object. I receive the
following error when calling Save():
Unable to save your information
Failed to save basket state to underlying stores.
the method call looks somthing like this:
myBasket.SetPropertyOnOrderForms("saved_cc_num_enc", encCCNum);
where saved_cc_num_enc is the column name in the OrderFormHeader table and
encCCNum is a byte array containing an encrypted version of a string.
(This is in Commerce Server 2002 with C#)
What in the world is going on here?
I have no problem storing binary data in profile property type fields, where
you can set up the mappings in the Commerce Server Manager, but this is not
the case with these OrderForm properties. I was under the assumption that
you simply use the same column name as the property name and it automatically
maps itself.
Thank You,
Justin
| |
| David Messner [MSFT] 2004-09-13, 5:52 pm |
| When you save a basket in CS200X, the underlying mechanism used is the
IPersistXML interface of the Dictionary/SimpleList/OrderForm objects. This
implementation does not support binary arrays. The only array type
supported is an array of Variants (Objects in .NET).
I suggest using something like a base-64 encoding and storing as string.
Hope that helps
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation. All rights
reserved.
--------------------
Thread-Topic: Saving Binary Value to OrderForm
thread-index: AcSMZNiTo2uAjOliRfePy2JMzXu3xA==
X-WBNR-Posting-Host: 69.18.134.139
From: =?Utf-8?B?SnVzdGlu?= <Justin@discussions.microsoft.com>
Subject: Saving Binary Value to OrderForm
Date: Fri, 27 Aug 2004 11:37:03 -0700
Lines: 26
Message-ID: <6312BA29-5FA6-48FC-8D04-4B8AD0F78597@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14647
X-Tomcat-NG: microsoft.public.commerceserver.general
Greetings all,
I'm attempting to add a binary value to the OrderForm collection using the
SetPropertyOnOrderForms method of the Basket object. I receive the
following error when calling Save():
Unable to save your information
Failed to save basket state to underlying stores.
the method call looks somthing like this:
myBasket.SetPropertyOnOrderForms("saved_cc_num_enc", encCCNum);
where saved_cc_num_enc is the column name in the OrderFormHeader table and
encCCNum is a byte array containing an encrypted version of a string.
(This is in Commerce Server 2002 with C#)
What in the world is going on here?
I have no problem storing binary data in profile property type fields,
where
you can set up the mappings in the Commerce Server Manager, but this is not
the case with these OrderForm properties. I was under the assumption that
you simply use the same column name as the property name and it
automatically
maps itself.
Thank You,
Justin
|
|
|
|
|