Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Inserting values into custom class error
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 10th February 17:07
alexander yushchenko
External User
 
Posts: 1
Default Inserting values into custom class error


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, "", ""

ADODB.Connection adoConnection = new ADODB.ConnectionClass();
adoConnection.Open("Provider=commerce.dso.1;Data
Source=mscop://InProcConnect/Server=my_server:
Catalog=DWSchemaatabase=my_database:FastLoad=Tru e: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
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666