Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Friday, March 23, 2012

Name property of SqlUserDefinedType

Hi,
MSDN describes that Name property of
Microsoft.SqlServer.Server.SqlUserDefinedType is not used by SQL Server, but
by VS.NET IDE. I have set a name for my UDT, how can I see its effect it
VS.NET IDE?
Thanks in advance,
Leila"Leila" <Leilas@.hotpop.com> wrote in
news:#maMbvsHGHA.2300@.TK2MSFTNGP15.phx.gbl:

> MSDN describes that Name property of
> Microsoft.SqlServer.Server.SqlUserDefinedType is not used by SQL
> Server, but by VS.NET IDE. I have set a name for my UDT, how can I see
> its effect it VS.NET IDE?
>
That statement is a bit misleading. The name property defines what name
the UDT will be created as, in SQL Server, if created through the auto
deployment features in VS.
So, if you have set the Name property and subsequently deployed the type
from within VS, you should see a type in the database with the same name
as the property.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||> MSDN describes that Name property of
> Microsoft.SqlServer.Server.SqlUserDefinedType is not used by SQL Server,
> but
> by VS.NET IDE. I have set a name for my UDT, how can I see its effect it
> VS.NET IDE?
Have you deployed the UDT from IDE? The Name property defines SQL Server
name of the type, which is used by IDE when deploying the type (i.e. when
IDE prepares the CREATE TYPE statement).
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message

Wednesday, March 21, 2012

Name and Description property of OLEDB Source components

I am adding two OLE DB Source components to my pipeline and giving them different names

(via the Sourcename variable) but like they are assuming default name and description i.e. OLE DB Source which is causing the following error message on opening the package that was generated.

The package contains two objects with the duplicate name of "component "OLE DB Source" (37)" and "component "OLE DB Source" (1)"

Here is how I am doing it, in the debugger the names in both instances seem to have set correctly based on the variable but when saved they are lost. What am I doing wrong here?

IDTSComponentMetaData90 source = dataFlowTask.ComponentMetaDataCollection.New();

source.Name = Sourcename;

source.ComponentClassID = "DTSAdapter.OleDbSource.1";

source.Description = Sourcename;

Thanks

Just figured it out. So if anyone else is running into this you need to be aware of the fact that the name you provide to the IDTSComponentMetaData90 is reinitialized after you get the design time instance of the component.

So the Name and other properties have to be assigned after the design time instance is created.

Monday, February 20, 2012

My own Dataflow Component. How make a property with list of predefined values?

I am creating of may of dataflow component.

How make a property with list of predefined values?

Thanks in advance.

If you create a custom UI for the component, you can display any list for the property that you like.

If you really want to do it right, so that the list shows up in the property window in Visual Studio, you'll probably need to implement a UITypeEditor and possibly a TypeConverter. See the Books Online topic "Design-time Methods of a Data Flow Component" for more information. http://msdn2.microsoft.com/de-de/library/ms135969.aspx

|||

Please see this earlier thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=115642&SiteID=1

-Doug

|||I would also look at using an enumeration for the property type/value.