Commerce Server General - Windows .Net Application For Profiles

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > January 2005 > Windows .Net Application For Profiles





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 Windows .Net Application For Profiles
Matt Nield

2005-01-27, 7:46 am

Hi,

I am attempting to create a .Net Windows Application to connect to my Profile Service in order to be able to be a bulk import of users from a legacy comerce solution. I seem to ba having some trouble connecting to the Profile Serivce itself. The error I receive is as follows:

"Unspecified Error" (From the caught exception)
and
"In BindArgs::OpenDataSrc(), failed initializing data source (-2147467259)" in the event log raised from "Commerce Server 2002"

The code that I am using references ActiveDSLib, CommerceLib and MSCSUPSLib from the Commerce Server 2002\Assemblies folder and reads as follows (the line in bold and underline contains the error):

Microsoft.CommerceServer.Interop.Profiles.ProfileServiceClass psc = new Microsoft.CommerceServer.Interop.Profiles.ProfileServiceClass();
string connection = "Provider=CSOLEDB;Data Source=MyServer;Initial Catalog=CS2002StarterSite_Profiles;User Id=sa;Password=*****;PsSchemaCacheSize=1
28;PsObjectAgeoutPeriod=8";
psc.Initialize(connection, "Adventure Works Catalog");
Microsoft.CommerceServer.Interop.Profiles.IProfileObject ipo = psc.CreateProfile("bob@bob.com", "UserObject");

If anyone can shed some light on this, I would be most grateful.

Regards

Matt Nield




Robert Bogue [MVP]

2005-01-28, 5:49 pm

I assume that the connection string works... I'd drop the PS* from the string since it shouldn't be required for what you're doing. You might also be explicit and add Integrated Security=false;

Rob

"Matt Nield" <matt@mattnield.com> wrote in message news:%23NL7U2FBFHA.2540@TK2MSFTNGP09.phx.gbl...
Hi,

I am attempting to create a .Net Windows Application to connect to my Profile Service in order to be able to be a bulk import of users from a legacy comerce solution. I seem to ba having some trouble connecting to the Profile Serivce itself. The error I receive is as follows:

"Unspecified Error" (From the caught exception)
and
"In BindArgs::OpenDataSrc(), failed initializing data source (-2147467259)" in the event log raised from "Commerce Server 2002"

The code that I am using references ActiveDSLib, CommerceLib and MSCSUPSLib from the Commerce Server 2002\Assemblies folder and reads as follows (the line in bold and underline contains the error):

Microsoft.CommerceServer.Interop.Profiles.ProfileServiceClass psc = new Microsoft.CommerceServer.Interop.Profiles.ProfileServiceClass();
string connection = "Provider=CSOLEDB;Data Source=MyServer;Initial Catalog=CS2002StarterSite_Profiles;User Id=sa;Password=*****;PsSchemaCacheSize=1
28;PsObjectAgeoutPeriod=8";
psc.Initialize(connection, "Adventure Works Catalog");
Microsoft.CommerceServer.Interop.Profiles.IProfileObject ipo = psc.CreateProfile("bob@bob.com", "UserObject");

If anyone can shed some light on this, I would be most grateful.

Regards

Matt Nield




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com