Matt Nield
Guest
|
Posted:
Thu Jan 27, 2005 4:49 pm Post subject:
Windows .Net Application For Profiles |
|
|
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=128;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]
Guest
|
Posted:
Fri Jan 28, 2005 10:19 pm Post subject:
Re: Windows .Net Application For Profiles |
|
|
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=128;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 |
|