Showing posts with label component. Show all posts
Showing posts with label component. Show all posts

Monday, March 19, 2012

COM+ won't accept Identity for Admin account

People haven't answered my post on 'dev.component', 'programming.component',
etc. I don't know where else to post this..
Hello.
Somehow my Component Services is all messed up on our productions site.
Normally, in test and all other environments I need to click "Identity" in
Com+ and put in "run as" Administrator of some other account with
privileges. It always works fine, except now on our production site it says
"The user account or password entered is not valid. If you entered a domain
account, make sure the name is prefixed with the domain name". Well, I am
positive that the account I am using is correct and has full privileges. I
even created a new account and made it an admin account- then tried that
both with and without the domain account (domain\user). No matter what I
do, it does not accept accounts that are absolutely valid. I've been
working on this problem for some time and have tried everything I can think
of.
Any ideas?Is the SQL server installed on the same box? If not, then that could
be a problem. Is the Windows account mapped to a SQLS login and have
permissions in the database?
-- Mary
MCW Technologies
http://www.mcwtech.com
On Mon, 15 Dec 2003 14:56:17 -0500, "Tom" <none@.none.com> wrote:
quote:

>People haven't answered my post on 'dev.component', 'programming.component'
,
>etc. I don't know where else to post this..
>
>Hello.
>Somehow my Component Services is all messed up on our productions site.
>Normally, in test and all other environments I need to click "Identity" in
>Com+ and put in "run as" Administrator of some other account with
>privileges. It always works fine, except now on our production site it say
s
>"The user account or password entered is not valid. If you entered a domai
n
>account, make sure the name is prefixed with the domain name". Well, I am
>positive that the account I am using is correct and has full privileges. I
>even created a new account and made it an admin account- then tried that
>both with and without the domain account (domain\user). No matter what I
>do, it does not accept accounts that are absolutely valid. I've been
>working on this problem for some time and have tried everything I can think
>of.
>Any ideas?
>

Sunday, March 11, 2012

COM Exception

I already added the the COM Component: Microsoft ADO ext. 2.8 for DLL and Security

Dim jro1 As JRO.JetEngine

jro1 = New JRO.JetEngine

jro1.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\testDB.mdb;Jet OLEDB:Database Password=test", _

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Backup\testDB.mdb;Jet OLEDB:Engine Type=4;Jet OLEDB:Database Password=test")

Error:

Retrieving the COM class factory for component with CLSID {DE88C160-FF2C-11D1-BB6F-00C04FAE22DA} failed due to the following error: 8007007e.

This error code corresponds to "The specified module could not be found". You can use regedit to find this CLSID and check to see if the file path it lists is actually valid (you'll want to look under something like My Computer\HKCR\CLSID\{DE88C160-FF2C-11D1-BB6F-00C04FAE22DA}\InProcServer32). The default value under that key should specify a path to the JRO.JetEngine's COM DLL...double check to ensure that this file does, in fact, exist.

COM Exception

I already added the the COM Component: Microsoft ADO ext. 2.8 for DLL and Security

Dim jro1 As JRO.JetEngine

jro1 = New JRO.JetEngine

jro1.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\testDB.mdb;Jet OLEDB:Database Password=test", _

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Backup\testDB.mdb;Jet OLEDB:Engine Type=4;Jet OLEDB:Database Password=test")

Error:

Retrieving the COM class factory for component with CLSID {DE88C160-FF2C-11D1-BB6F-00C04FAE22DA} failed due to the following error: 8007007e.

This error code corresponds to "The specified module could not be found". You can use regedit to find this CLSID and check to see if the file path it lists is actually valid (you'll want to look under something like My Computer\HKCR\CLSID\{DE88C160-FF2C-11D1-BB6F-00C04FAE22DA}\InProcServer32). The default value under that key should specify a path to the JRO.JetEngine's COM DLL...double check to ensure that this file does, in fact, exist.

Friday, February 24, 2012

Column Mapping in a Custom Component

Does anyone know how to get destination coulmns to show up in the advanced editor for a custom component? I have a custom flat file destination component that builds the output based on a specific layout. It works as long as the upstream column names match my output names. What I want is to allow non-matching columns to be mapped by the user as they can in a stock flat file destination. The closest that I have been able to come is to get the "column mappings" tab to show up and populate the "Available Input Columns" by setting ExternalmetadataColumnCollection.IsUsed to true on the input. The problem is that the "Available destination columns" box is always empty. I have tried the IsUsed property on the output and pretty much every other property that I could find. On the Input and Output properties all of my columns show up under the output as both External and Output columns. Is there a separate collection for "destination" columns that I can't find? It's getting a little frustrating, is this something that can be done or do I have to write a custom UI to make it happen?

Thanks!
Harry

Have you added columns to the external metadata column collection for you destination? The available destination columns come from this collection so if you haven't put any columns there then there are none to be displayed.

Matt

|||

Matt,

Thanks for your response. Yes, I think that I have added the columns to the external metadata for the output. The output is built from a sql server table containing the layout. The layout (copybook) is supplied via a custom property. All of the columns show up correctly on the input and output page and there is an external and output list there. Here is my code that builds the output. I have also tried setting the SyncronousInputID and it doesn't make any difference.
(Please keep in mind that I am just learning C# )

Thanks!
Harry

IDTSOutput90 output = this.ComponentMetaData.OutputCollection.New();
output.Name = _copybook;
output.ExternalMetadataColumnCollection.IsUsed = true;
output.SynchronousInputID = 0;
IDTSOutputColumnCollection90 outCols = output.OutputColumnCollection;
IDTSExternalMetadataColumnCollection90 extCols = output.ExternalMetadataColumnCollection;
SqlConnection sqlConn = new SqlConnection();
UpdateConnectionString();
sqlConn.ConnectionString = _connectionString;
sqlConn.Open();
SqlCommand sqlCmd = sqlConn.CreateCommand();
sqlCmd.CommandText = "Select ColumnName, ColumnType, Length, Precision, Scale" +
" From " + _copybook +
" Order By ColumnSeq";
SqlDataReader sqlRdr = sqlCmd.ExecuteReader();
DataType dtColType;
while (sqlRdr.Read()) {
string ColumnName = sqlRdr.GetString(0).Trim();
string ColumnType = sqlRdr.GetString(1).Trim();
Int16 Len = sqlRdr.GetInt16(2);
Int16 Prec = sqlRdr.GetInt16(3);
Int16 Scale = sqlRdr.GetInt16(4);
IDTSOutputColumn90 outColumn = outCols.New();
outColumn.Name = ColumnName;
switch (ColumnType) {
case "Z":
dtColType = DataType.DT_NUMERIC;
Len = 0;
break;
case "P":
dtColType = DataType.DT_NUMERIC;
Len = 0;
break;
case "B":
if (Len > 4)
dtColType = DataType.DT_I8;
else if (Len > 2)
dtColType = DataType.DT_I4;
else
dtColType = DataType.DT_I2;
Len = 0;
break;
default:
dtColType = DataType.DT_WSTR;
break;
}
outColumn.SetDataTypeProperties(dtColType, Len, Prec, Scale, 0);
IDTSExternalMetadataColumn90 extColumn = extCols.New();
extColumn.Name = outColumn.Name;
extColumn.DataType = outColumn.DataType;
extColumn.Length = outColumn.Length;
extColumn.Precision = outColumn.Precision;
extColumn.Scale = outColumn.Scale;
extColumn.CodePage = outColumn.CodePage;
outColumn.ExternalMetadataColumnID = extColumn.ID;
}

sqlRdr.Close();
sqlCmd.Dispose();
sqlConn.Close();
sqlConn.Dispose();

|||

Well, I don't know if this is the only problem but destinations don't have outputs only inputs (genrally speaking anyhow). A destination usually just has an input (and many have an error output, but that is just for rows that fail to get written to the destination. You would then add external columns to the input's external columns collection and map the column to the associated input column.

Matt

|||

Matt,

Thanks, that was it. I didn't know that the mapping relation was between the input and the external metadata for the input. It makes sense, I was just stuck on mapping input to output. This is really supposed to be a tranformation so that's where the output came from. I just made it a destination to see if that was my issue. It probably did look a bit odd to have an output on a destination

Again, thank you for your help.

Harry