| Ravi Shankar 2004-09-02, 6:21 pm |
| Ok. I located that and trying to do something using
VB.Net as so..
(i've included the mscscorelib.dll and Commerce 1.0
object) as com references into the project
Imports Microsoft.CommerceServer.Interop
Imports Microsoft.CommerceServer.RunTime
Imports Microsoft.CommerceServer.RunTime.Configuration
Dim oCouponGroup As New Dictionary
Dim oCouponCollection As New
System.Collections.Specialized.HybridDictionary
Dim gOrderGroupID As Guid
Dim sOrderGroupID As String
Dim sUserID As String = "{0D93ED9A-1837-4FD6-8966-
D635FB011DC6}"
oDBStorage = New
Microsoft.CommerceServer.Interop.Orders.DBStorage
oDBStorage.InitStorage(oTransactionResource.Item
("connstr_db_transactions"), "CouponGroup", "coupongroup_i
d
user_id", "Commerce.Dictionary", "marshaled_data", "d_Date
LastChanged")
gOrderGroupID = System.Guid.NewGuid()
oCouponGroup.Value("coupongroup_id") =
gOrderGroupID.ToString()
oCouponGroup.Value("user_id") = sUserID
oCouponGroup.Value("coupon_collection") =
oCouponCollection
oCouponGroup.Value("total_coupons") =
oCouponCollection.Count
oDBStorage.InsertData(vbNull, CType(oCouponGroup, Object))
But it fails at this call with an error of
type 'System.Runtime.InteropServices.COMException' thats
says "Type Mismatch"
I have a feeling its to do with which Dictionary
Defintion is getting picked up but if I get the same
error if I use the IDictionary.. (and instantiate it as
Dictionary)
Can someone help !
>-----Original Message-----
>Sometime back there was a discussion on
>accessing/processing marshaled_data !!!
>
>I can't seem to locate those threads.. Could someone
>throw fresh light on the topic please.
>
>Regards.
>.
>
|