Showing posts with label assemblies. Show all posts
Showing posts with label assemblies. Show all posts

Monday, March 12, 2012

Non value-type parameters in Assemblies/ CLR UDFs:

I am building a simple utitility to be hosted as a database assembly in SASS 2005. This is a .Net Assembly]

My method is date dependent and I want to pass in a DateTime rather than a string (globalisation issues.. you know the story). Can I do this and how would I pass this parameter in an MDX query?

I also want to pass in such thigs as the StorageMode enum etc. Presumably I can pass in the integer value... (kinda defeats the reason for using enums though)

Update to this, I find that you can pass the DateTime as a string and SSAS does some sort of implicit cast. this is still very sensitive to date string formatting, so is not ideal!|||

Well, it seems that after due consideration I have to answer my own post!

I think the problem is that we can only really pass in basic value types via text in queries, essentially strings and numbers. If I really want to pass in a class/struct I could pass in a string representing the XML Serialized class. For example, if I want to pass in a DateTime rather than a string, I could create an XML version of the DateTime structure. Of course, the alternative for dates would be to specify a universal format, such at the ISO format (yyyy-mm-dd) and ensure that this is rule is always adhered to, but this is coding by convention rather than using strong typing.

Now, my only problem is how to return data in a strongly typed format.... now the XML serialisation seems to be the answer to this one...

Wednesday, March 7, 2012

Nofications assemblies not found with .net 2.0

Hi guys,

I was trying to develop a non hosted event provider and decided to use NS event object api to submit events to NS. My development system has VS 2005 and my plan is to connect to a NS instance running on a machine on the local network.

But it is weird that I could not find "Microsoft.SqlServer.NotificationServices.dll" in my dev system. Does it mean to develop NS applications we need to have VS 2005 and Sql Server 2005 on same box.

Also note that I have sql server express edition on my development machine and I am aware that express editions doesn't support notification services.

Thanks,

Shamir

Hi Ahmed -

You need to install the SQL Server 2005 Notification Services Client

Components on the development machines.

http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&DisplayLang=en

Only Standard and Enterprise Editions support SSNS.

http://www.microsoft.com/sql/prodinfo/sysreqs/default.mspx

HTH...

Joe

--

Joe Webb

SQL Server MVP

http://www.sqlns.com

~~~

Get up to speed quickly with SQLNS

http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.

(www.sqlpass.org)

On Sun, 23 Jul 2006 02:47:01 -0700,

wrote:

>Hi guys,

>

>I was trying to develop a non hosted event provider and decided to use

>NS event object api to submit events to NS. My development system has VS

>2005 and my plan is to connect to a NS instance running on a machine on

>the local network.

>

>But it is weird that I could not find

>"Microsoft.SqlServer.NotificationServices.dll" in my dev system. Does it

>mean to develop NS applications we need to have VS 2005 and Sql Server

>2005 on same box.

>

>Also note that I have sql server express edition on my development

>machine and I am aware that express editions doesn't support

>notification services.

>

>Thanks,

>

>Shamir

>

>|||

[Reposting since my prior post didn't seem to render very well.]

Hi Ahmed -

You need to install the SQL Server 2005 Notification Services Client
Components on the development machines.
http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&DisplayLang=en

Only Standard and Enterprise Editions support SSNS.
http://www.microsoft.com/sql/prodinfo/sysreqs/default.mspx


HTH...

Joe


--
Joe Webb
SQL Server MVP
http://www.sqlns.com


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)