I use MSCS2002 + SP3 + FP1
I have extended dw with a custom class Region_ZipCode (consisting
of 2 fields) with the use of 'CreateSchemaObject.vbs' script from SDK:
CreateClassDef cn, "Region_ZipCode", "test_Source", "", True, 0, ""
CreateMemberDef cn, "Region_ZipCode", "Zip", "WSTR8",
fGenerateColDef + fIsRequired + fPrimaryKey + fHasDefaultVal, "0", ""
CreateMemberDef cn, "Region_ZipCode", "Region_ID", "NUMBER",
fGenerateColDef + fIsRequired, "", ""
After that I try to execute the following code (written in c#):
ADODB.Connection adoConnection = new ADODB.ConnectionClass();
adoConnection.Open("Provider=commerce.dso.1;Data
Source=mscop://InProcConnect/Server=my_server:
Catalog=DWSchema:Database=my_database:FastLoad=True:Connection_Retry=10:Connection_Retry_Delay=30",
"my_user", "my_password", 0);
object nullObject = Type.Missing;
adoConnection.Execute("DELETE FROM Metro_ZipCode", out nullObject, 0);
adoConnection.Execute("INSERT INTO Region_ZipCode (Region_ID, Zip)
VALUES (1, '99999')", out nullObject, 0);
adoConnection.Close();
The first "Execute" command is successful.
The second one throws the following exception: "Exception from
HRESULT: 0xCA2D8038." And no more information.
Please, advice.
--
Yours faithfully,
Alexander Yushchenko


|