CodeSmith Community
Your Code. Your Way. Faster!

SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

Latest post 06-18-2008 2:37 PM by evolved. 8 replies.
  • 05-18-2007 6:16 AM

    SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    Hi Guys, 

    I am trying to perform an evaluation of CodeSmith combined with .netTiers. Initially tried against a dummy database, all fine and enough for me to start an assessment. I then pointed at our genuine db schema but as soon as I tried to connect I received this error from the 'test connection' on the connection editor:

    "Test Failed. Data Is Null. This method or property cannot be called on null values."

    I think I've tracked it down to the existence of a Partition Schema and partition function in the database. As soon as any table in the database is created using the partition and the partition function, the above error is thrown and no connection is made. The connection editor is the only place that gives feed back in the form of the above error, the actual schema explorer simply does not perform any population for the database.

    Clearly for the purposes of assessment and generation I can simply remove the partition function and create the table(s) on Primary but it would be nice not to have to do this.

    Cheers

    Pat 

     

    • Post Points: 90
  • 08-13-2007 7:55 AM In reply to

    • PhilD
    • Top 500 Contributor
    • Joined on 08-13-2007
    • Posts 17
    • Points 475

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    I am also evaluating CS and also have this problem. It's because CS uses the SQL below to get the list of tables, and for partitioned tables it returns NULL in the FILE_GROUP column. When CS starts iterating over the tables to query their extended properties it blows up on the first partitioned table. SELECT object_name(so.id) AS OBJECT_NAME, schema_name(so.uid) AS USER_NAME, so.type AS TYPE, so.crdate AS DATE_CREATED, fg.file_group AS FILE_GROUP FROM dbo.sysobjects so LEFT JOIN ( SELECT s.groupname AS file_group, i.id AS id FROM dbo.sysfilegroups s INNER JOIN dbo.sysindexes i ON i.groupid = s.groupid WHERE i.indid < 2 ) AS fg ON so.id = fg.id WHERE so.type = N'U' AND permissions(so.id) & 4096 <> 0 AND ObjectProperty(so.id, N'IsMSShipped') = 0 AND NOT EXISTS (SELECT * FROM sys.extended_properties WHERE major_id = so.id AND name = 'microsoft_database_tools_support' AND value = 1) ORDER BY schema_name(so.uid), object_name(so.id)
    Filed under: , ,
    • Post Points: 5
  • 08-13-2007 4:36 PM In reply to

    • RogerG
    • Not Ranked
    • Joined on 02-19-2007
    • Posts 2
    • Points 40

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    "Data is Null. This method or property cannot be called on Null". Ouch. This is all of the sudden biting me as well.. Can you better explain the work around? I am pointing to a schema that I do not (unfortunately) have control over. 

    Thanks,

    Filed under: ,
    • Post Points: 5
  • 08-13-2007 4:58 PM In reply to

    • RogerG
    • Not Ranked
    • Joined on 02-19-2007
    • Posts 2
    • Points 40

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    I did discover that giving DBO access to the user Codesmith was using, fixed the issue.

     

    • Post Points: 35
  • 08-14-2007 2:21 AM In reply to

    • PhilD
    • Top 500 Contributor
    • Joined on 08-13-2007
    • Posts 17
    • Points 475

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    Roger, dbo doesn't fix it for me, in fact I am sa on the box. I don't know a workaround.
    • Post Points: 35
  • 08-28-2007 3:35 PM In reply to

    • Ducati
    • Not Ranked
    • Joined on 08-30-2006
    • Posts 2
    • Points 40

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    Any resolution to this?  I just came across this problem today and I'm dead in the water till I find a workaround/fix.

    • Post Points: 5
  • 09-04-2007 8:47 AM In reply to

    • Ducati
    • Not Ranked
    • Joined on 08-30-2006
    • Posts 2
    • Points 40

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

     Still awaiting a response...

    • Post Points: 35
  • 09-05-2007 3:19 AM In reply to

    • PhilD
    • Top 500 Contributor
    • Joined on 08-13-2007
    • Posts 17
    • Points 475

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

    I wouldn't hold your breath. No response from the CodeSmith company - not even a "we know about it, we are working on it" - in 3 months. I have even emailed Eric J Smith directly through the forum and still no response. WTF is the point of running a public forum if you don't respond to discussions on MAJOR, BLOCKING bugs?

    My evaluation period is up in a few days. I was keen on CodeSmith / NetTiers to start with, but as time has progressed and there has been no response on this issue I have become disappointed. I can't see us spending money on an product from a company which treats its users in this fashion.

    • Post Points: 35
  • 06-18-2008 2:37 PM In reply to

    • evolved
    • Top 50 Contributor
    • Joined on 12-27-2004
    • South River, NJ
    • Posts 93
    • Points 1,825

    Re: SQL2005 Partition Schemes - "Test Failed. Data Is Null. This method or property cannot be called on null values."

     We just partitioned our main server, and now I am getting the same error. Is there a patch or workaround available?

    http://www.jheidt.com
    ------------------------------
    Member of the .NetTiers team
    http://www.nettiers.com
    ------------------------------

    • Post Points: 5
Page 1 of 1 (9 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems