Showing posts with label object. Show all posts
Showing posts with label object. Show all posts

Tuesday, March 27, 2012

Creation name for ComponentMetadata

Hi,
I want to get the TaskHost.CreationName equivalent on a IDTSComponentMetaData90 object. Basically the CreationName property returns me the string used to create an instance of the DtsContainer object. (DTS.Pipeline for example). How do I get an equivalent on a data flow component. (ComponentMetadata object). There is a ObjectType property which returns a enum of type DTSObjectType but I want a string representation of the enum.

Thanks,
-SuriI figured out a work around. The CreationName is the ProgId and the ComponentClassId on the ComponentMetadata object gives me the classid. I do a little Pinvoke on ole32.dll to use ProgIDFromCLSID.

let me know if there is a better way.

Thanks|||I'm not sure what you are doing, but you may want to look at the Microsoft.SqlServer.Dts.Runtime.Application object and the PipelineComponentInfos.

Each PipelineComponentInfo has a CreationName.

Wednesday, March 7, 2012

Creating object type

How to create object type in sql server,
i.e in Oracle we can directly create an object TYPE and we can use it in other applications.
What's the equivalent of this object Type in SQL Serverdo you mean a user defined type?|||Yes, a user defined type|||have a look at udts in BOL:

for CLR based types (2005 only): http://msdn2.microsoft.com/en-us/library/ms131106.aspx

for SQL based types:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_addp_584l.asp (2000 syntax, deprecated in 2005 - there you should use CREATE TYPE instead)|||I was going to bring up CLR triggers here but I am not sure I want all of that application code running under my sql service. The book I am writing makes a fair case for some things .Net does faster than sql like string manipulation, running totals and such but I am not sure I am sold yet.

Creating object in SQL 2000 Server DB

I opened SSMSexpress and attached to my sql 2005 database and automatically created the scripts for creating all the object in a SQL 2000 DB. The objects seem to be created but I did get script messages. Are these messages harmless?
thanks
Milton

Msg 208, Level 16, State 1, Procedure Requestview, Line 3

Invalid object name 'dbo.requests'.

Msg 15135, Level 16, State 1, Procedure sp_validatepropertyinputs, Line 147

Object is invalid. Extended properties are not permitted on 'dbo.Requestview', or the object does not exist.

Msg 15135, Level 16, State 1, Procedure sp_validatepropertyinputs, Line 147

Object is invalid. Extended properties are not permitted on 'dbo.Requestview', or the object does not exist.

Extended Properties are not in 2000 and the question is why do you need them, it is not simple to move database from 2005 to 2000 so check out the long instructions in the thread below. Hope this helps.

http://forums.asp.net/thread/1494094.aspx

|||Not all extended properties are necessary for an database object, for example description for a object is also a kind of extended property. In SQL2000 you can usesp_addextendedproperty system procedure to add extended procedures, and the properties information will be stored in sysproperties system table.