locked
creating a new data type RRS feed

  • Question

  • hello,

    i am using VS2010 and the included SQL Server Express Edition 2008 SP3 (10.00.5500.0 x64).  i would like to add a new data type, but the when i right click the "Types" folder, the option to do so is not listed.  i only see "Refresh" and "Properties" in the option list.

    is there something i am missing or is there some other way to create/edit the new type?

    thanks!

    Sunday, September 9, 2012 6:47 AM

Answers

  • Hello,

    Run your statement in SSMS in a new query window; you just need to create the data type once.


    Olaf Helper
    Blog Xing

    • Marked as answer by desertchief Sunday, September 9, 2012 9:10 AM
    Sunday, September 9, 2012 8:22 AM

All replies

  • Hello,

    ou can use the CREATE TYPE (Transact-SQL) command to add a new data type alias.


    Olaf Helper
    Blog Xing

    Sunday, September 9, 2012 7:05 AM
  • thanks, but where would i place this statement?  i have a stored procedure i am trying to use with a table-valued parameter and this new table type.

    the new type statement looks like this:

    CREATE TYPE dbo.tvpList AS TABLE
    (
     tvpListColumn nvarchar(50) NULL
    )

    but i am unable to find an acceptable location for this tsql.  i receive errors if i try to nest it in the stored procedure.

    Sunday, September 9, 2012 7:39 AM
  • Hello,

    Run your statement in SSMS in a new query window; you just need to create the data type once.


    Olaf Helper
    Blog Xing

    • Marked as answer by desertchief Sunday, September 9, 2012 9:10 AM
    Sunday, September 9, 2012 8:22 AM
  • that did the trick!  thanks very much.

    VS2010 still does not show the new data type, but i do see it now under the "Types" folder in SSMS.  i wish there was a setting in VS2010 to enable this view.

    Sunday, September 9, 2012 9:10 AM