|
Home > Archive > Commerce Server General > October 2006 > How to create Commerce Context from Desktop/Console app. in CS 200
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 |
How to create Commerce Context from Desktop/Console app. in CS 200
|
|
| Prasenjit 2006-10-31, 7:21 pm |
| Hi,
I am using CS 2002 with SP4.I need to create a batch application (which
would preferably be a console application ),which would be able to work with
Order Context and Profile Context of my Commerce Server Web Application.
I tried with the following sample of code:
OrderContext octx=new OrderContext("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Initial Catalog=HillaryDev_PP_commerce;Data
Source=SRISDEV01;",new DebugContext(DebugMode.Checked));
profContext =new ProfileContext("Provider=SQLOLEDB.1;Integrated
Security=SSPI;Initial Catalog=HillaryDev_PP_commerce;Data
Source=SRISDEV01;",new DebugContext(DebugMode.Checked));
But DebugContext can only be created from Commerce Context.
I could not find any sample code with which Commerce Context for a
particular Commerce Server Web Application can be created within a .NET
console or windows forms application in CS 2002.
But I found that it can easily be done in CS20007 with following code
OrderContext orderCtx = OrderContext.Create(Constants.SiteName);
Can anybody help me with this situation.I need immediate help in creating
Commerce Context from a .NET console application for a particular CS
application with CS 2002.
regards
Prasenjit
| |
| Joseph Johnson 2006-10-31, 7:21 pm |
| Prasenjit,
I believe you want to use a ConsoleDebugContext object as the second
parameter for your local context objects.
The documentation for this class should be available on MSDN.
Joe
"Prasenjit" <Prasenjit@discussions.microsoft.com> wrote in message
news:0DFA2459-C07D-461B-8DBD-AA260BFEB0E8@microsoft.com...
> Hi,
>
> I am using CS 2002 with SP4.I need to create a batch application (which
> would preferably be a console application ),which would be able to work
> with
> Order Context and Profile Context of my Commerce Server Web Application.
> I tried with the following sample of code:
> OrderContext octx=new OrderContext("Provider=SQLOLEDB.1;Integrated
> Security=SSPI;Initial Catalog=HillaryDev_PP_commerce;Data
> Source=SRISDEV01;",new DebugContext(DebugMode.Checked));
>
> profContext =new ProfileContext("Provider=SQLOLEDB.1;Integrated
> Security=SSPI;Initial Catalog=HillaryDev_PP_commerce;Data
> Source=SRISDEV01;",new DebugContext(DebugMode.Checked));
>
> But DebugContext can only be created from Commerce Context.
> I could not find any sample code with which Commerce Context for a
> particular Commerce Server Web Application can be created within a .NET
> console or windows forms application in CS 2002.
> But I found that it can easily be done in CS20007 with following code
>
> OrderContext orderCtx = OrderContext.Create(Constants.SiteName);
>
> Can anybody help me with this situation.I need immediate help in creating
> Commerce Context from a .NET console application for a particular CS
> application with CS 2002.
>
> regards
> Prasenjit
|
|
|
|
|