Tuesday, July 27, 2010

5 Abiotic About Great White Shark

Entity Framework and ProviderManifestToken

When using the Entity Framework (certainly the version 4, the first guess but I never tried), the model is "ties" to the version of the database that was indicated in the initial phase. This bond is written to the model, specifically in ssdl in property ProviderManifestToken and this property is not editable by the designer. Obviously from that property depends on the type of SQL generated for the various interrogazioni.
Questo può portare a problemi/fastidi se nell’ambiente di sviluppo si usa una versione di SQL Server differente da quella che si ha in ambiente di test/produzione. Se ad esempio si sviluppa su SQL Server 2008 ma sull’ambiente di produzione del cliente si ha SQL Server 2005 il nostro progetto rischia di non funzionare, soprattutto se usiamo dei campi data: la versione per SQL 2008 sfrutta il tipo datetime2 che in SQL 2005 non esiste.
La soluzione che ho adottato e che funziona correttamente in un sistema già rilasciato presso un cliente prevede i seguenti passi:

  1. Impostare il modello affinché non “embeddi” i file, tra cui l’ssdl, nella dll ma li copi in the output folder - in other words in the properties of the model set Metadata Artifact Processing to "Copy to Output Directory" instead of "Embed in Output Assembly"
  2. Create a simple console application that takes the file and go ssdl to replace the value of ProviderManifestToken (at the bottom shows a simple code example), and "linked" to the project that contains the template
  3. Set the post-event buil the project containing our model to call the console application and then copy the newly created Template files (CSDL, MSL and SSDL) in the "bin" of our startup project (education xcopy)
  4. Set the configuration file (web.config in my case) that the connection string points to the copied files correctly with the post-build operation

The simple console application code that I have prepared is as follows:

  1:     static void Main  (  string [] args) 
  2: { 
  3:    ModelName string = args [0]; 
  4 :    string filePath = string  . Format ( ". / {0}. ssdl" , ModelName); 
  5:  
  6:  was edmx =  new  XmlDocument (); 
  7:  edmx.Load (filePath); 
  8:  was  NSM = new XmlNamespaceManager  (edmx.NameTable); 
  9:  nsm.AddNamespace ( "a" ,  "http://schemas.microsoft.com/ado/2009/02/edm/ssdl" ); 
  10:  was x = edmx.SelectSingleNode ( "/ a: Schema" , NSM); 
  11:  x.Attributes [ "ProviderManifestToken" ]. Value  = "2005" ; 
  12:  edmx.Save (filePath); 
  13:}  

In this case wants the name of the model in order to deduce the input file name ssdl, and sets the default ProviderManifestToken in 2005. Obviously the change to take in input the value to be set to ProviderManifestToken is trivial.

Some useful links:

P.S. L’errore dato dall’applicativo dal quale è emerso questo comportamento legato al ProviderManifestToken è stato “ SQL Server in use does not support datatype datetime2 ”.

Tag: , , EF , , programming, development , SQL Server, SQL Server 2005 , SQL Server 2008 , , , model, domain,

Sunday, July 25, 2010

Letter Of Introduction To An Employment Agency

Andrew Gold - The Final Frontier

Tags: video, music , mad about you, theme, youtube ,

Friday, July 23, 2010

Beer In Barrels For Sale

Choosing the right WCF binding

Sign me extremely interesting because: Choosing the right WCF binding .

The post 9 summarizes the built-in bindings for WCF and indicates when it is appropriate to use each.

Extremely intuitive and clear the chart provided, I report, taken from a chapter of "Programming WCF Services " by Juval Lowy:

Tags: Microsoft , WCF, Windows Comunication Foundation , , web services, services , SOA, architecture

Restorable Cars For Sale

Problems installing KB970892 on SQL 2005 Reporting Services, and font embedding

on a server update "Security Update for SQL Server 2005 Service Pack 3 (KB970892 )" was not installed. Windows update error, but gave no specific details.

Reason? On the server, as well as SQL Server 2005 Standard Edition 32bit with SP3 was installed but not started (even disabled) is also a version of SQL Express. By starting the upgrade SQL Express is installed correctly.

Tags: SQL Server, SQL Server Express , KB970892, Security Update

Thursday, July 22, 2010

Frequency Of Hindi Channels



Problem: I make available on a portal web dei bollettini di pagamento personalizzati per utente. Tali bollettini devono essere scritti con un carattere particolare così da essere facilmente leggibili in banca dagli appositi lettori. Nella fattispecie si tratta del font OCR-B.

La soluzione adottata si basa su SQL Server Reporting Services, per la precisione, per questioni di licenza, la versione 2005 con SP3 installata.

Dalla pagina web, in base all’utente loggato, si passano i parametri opportuni al report creato e si da in output all’utente direttamente il file pdf, senza passare per la preview con il controllo reportviewer.

In altre parole nulla di strano o articolato se non fosse per il carattere OCR-B. Se il carattere non è installato sul client il pdf viene mostrato con un carattere standard. Per ovviare bisogna far “embeddare” il carattere nel pdf.

Cosa dice Microsoft al riguardo:

Font embedding privileges are granted by the font author. Installed fonts include a property that indicates whether the font author intends to allow embedding a font in a document. If the property value is EMBED_NOEMBEDDING, the font is not embedded in the PDF file. For more information, see "TTGetEmbeddingType" on msdn.microsoft.com.

The Font is TrueType.

The characters in the string that has the Font property set are Unicode, not ANSI. No font embedding occurs for ANSI characters.

Fonts are referenced by visible items in a report. If a font is referenced by an item that has the Hidden property set to True , the font is not needed to display rendered data and will not be included in the file. Fonts are embedded only when they are needed to display the rendered report data.

Stando a quanto letto in giro per la rete il supporto per l’”automatic full font embedding” è garantito solo da Reporting Services 2008 con installato il Cumulative Update #1 for SQL Server 2008.

Tuttavia è possibile cavarsela anche utilizzando Reporting Services 2005 e SQL Server 2005 SP3.

In questa situazione se il testo all’interno del report contiene soltanto caratteri “latin” l’embedding del font non sarà possibile.

Occorrerà aggiungere caratteri non ANSI (ad esempio: ޝ) per ogni testo nel report scritto con il font che si vuole “embeddare”.

Naturalmente occorrerà anche che il font sia True Type ed embeddable.

Per controllare le caratteristiche dei vari font può essere utile Font property extension, un tool Microsoft ( http://www.microsoft.com/typography/TrueTypeProperty21.mspx ).

Serviranno entrambi i file con estensione pfm e ttf.

Per l’installazione del carattere da effettuare sul server di Reporting si può fare riferimento alla guida Microsoft presente online ( http://support.microsoft.com/kb/314960).

In our case, care must be taken to install for the first character Type 1 (pfm files) and then the True Type (ttf extension), although we do not understand why.

After you install the fonts you need to reboot the machine.

Now the pdf generated by Reporting embedded in the nature and any client can then print out the invoice.

recap:

  • RS2005 + SQL2005 SP3
  • True Type Font and allowed Embed
  • Prepare the report by adding non-ANSI characters in textbox that uses the character that you want to embed
  • install the font (based on the file pfm (Type1) and continuing with the TTF (True Type))
  • Reboot
  • Place the report and make the deploy

Tag: Reporting , Reporting Services, SQL Server , , pdf, font, font embedding , ASP.NET, development,

Sunday, July 18, 2010

Morrowind Bloodmon V1.6.1820

The World Seen From Berlusconi (advertising of Le Monde)

Tags: Berlusconi, Italy , France, Le Monde , advertising, funny, video

Saturday, July 17, 2010

Homemade Male Masterbater

Tier vs. Layer

clarification, perhaps unnecessary, but I often do. For

tier levels means "physical" , while layer levels means "logical" .

Quoting from a couple of posts:

Logical layers are Merely a way of organizing your code. Typical layers include Presentation, Business and Data - The Same as the traditional 3-tier model. But when we’re talking about layers, we’re only talking about logical organization of code. In no way is it implied that these layers might run on different computers or in different processes on a single computer or even in a single process on a single computer. All we are doing is discussing a way of organizing a code into a set of layers defined by specific function.

Physical tiers however, are only about where the code runs. Specifically, tiers are places where layers are deployed and where layers run. In other words, tiers are the physical deployment of layers.

Link:

http://www.lhotka.net/WeBlog/PermaLink.aspx?guid=efa88d0a-2388-4909-bee1-c9bddb6e9868

http://codebetter.com/blogs/david.hayden/archive/2005/07/23/129745.aspx  

Questa precisazione è necessaria anche perché spesso, soprattutto in ambiente universitario, si sentono usare questi termini a casaccio.

Wedding Sayings For Bubbles

SSRS -

In Microsoft SQL Server Reporting Services, quando bisogna visualizzare degli importi si ha a disposizione la funzione FormatCurrency . Bisogna poi ricordarsi di settare la lingua del report, altrimenti usando quella di default userà le impostazione del server su cui è installato.

Welcome Speech Sample From Ceo

Figures 7 and Windows shutdown problems with Asus MB

Ho una scheda madre Asus (P5B-E) e dopo aver installato Windows 7 al momento dello spegnimento il sistema operativo chiudeva regolarmente, i dischi si disattivavano, ma la ventola rimaneva attiva e il pc quindi acceso.

Cercando su internet e sul forum dell’ASUS ho trovato la soluzione: andare su Device Manager – IEEE 1394 Bus host controllers – VIA 1394 OHCI Compliant Host Controller – Properties – Power Management – spuntare la voce Allow the computer to turn off this device to save power.

Dopo aver spuntato tale voce il pc ha ripreso a spegnersi regolarmente.

How To Hack A 3 Dongle

Shrew: vpn client for 64-bit

Problema: in azienda la VPN si appoggia a Cisco e abbiamo il Cisco VPN Client per connetterci. Peccato che tale client esista solo per piattaforma 32 bit e non 64 bit.

Soluzione: cestinare l’odioso Cisco VPN Client and install the Shrew Soft VPN Client.

Features:

  • support systems 32 and 64 bit (including Windows 7)
  • compatibility with the Cisco gateway can
  • import pcf profile Cisco
  • much lighter than the Cisco Client
  • free

Link: http://www.shrew.net/

Tags: Cisco , vpn, Cisco Client , shrew, software, 64 bit

See Thru Underwears For Men

First post

I already had a blog, recently aggiornato assai di rado, su Blogsome: http://oplero.blogsome.com/

Per svariati motivi – o semplicemente perché Blogsome come piattaforma non mi entusiasma – ho deciso di spostarmi su Blogger.

A cosa mi serve un blog? Principalmente per annotare cose che reputo interessanti, nella maggior parte dei casi legate al mio lavoro, e per avere un “repository” sempre disponibile dove recuperare link, pezzi di codice, etc. che possono servirmi.

Ripoterò quindi link a software che uso normalmente, appunti vari, etc. che dovranno anzitutto essere utili a me, e ovviamente spero possano essere utili anche ad altri.

Alcuni post che avevo pubblicato blogsome up (the ones that I find most interesting and perhaps still today) they will report on this, just to have a repository "one" with the info that can be used more often.

Tags: ,

Wednesday, July 14, 2010

How To Catch Legendary In Pokemon Deluge

service notice ...

July 14, 2010 Today I removed the blog from all the poems that I published . This I did for
due motivi: di recente tramite il servizio copyscape e grazie alla segnalazione di qualche lettore avevo scoperto che alcune erano state copiate su altri blog e Windows Live Spaces e spacciate per proprie dai possessori degli stessi,questo può capitare quando si rendono pubblici dei contenuti,io stessa ho copiato alcune frasi e citazioni in altri post (non le poesie ovviamente) ma ho sempre citato e linkato la fonte.
Il secondo motivo è che ho pubblicato tramite Lulu.com una raccolta dove ho inserito alcune di quelle poesie più altre "inedite" Se qualcuno fosse interessato qui sotto c'è un pulsante che vi rimanda al link del libro :)





paper version