dbtype

C# - convert strings such as "uniqueidentifier", "timestamp", "image", "money", "sql_variant" etc. into .net data-types

How to convert strings such as "uniqueidentifier", "timestamp", "image", "money", "sql_variant" etc. into respective .net data-types? I need to query a table to find out its contained fields and then accumulate those into a list List<Column>. Column is a class written by me. So I need this mechanism. ...

Linq to sql Error "Data at the root level is invalid " for nullable xml column

I have Created a table like CREATE TABLE [dbo].[tab1]( [Id] [int] NOT NULL, [Name] [varchar](100) NOT NULL, [Meta] [xml] NULL, CONSTRAINT [PK_tab1] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ...

Using dbtype.structure with SubSonic 2?

When sending data to a stored procedure through SubSonic, how can I pass a dbtype.structure? I have a TVP defined as READONLY, and when SubSonic generates the StoredProcedures.cs file, the parameter shows up as a string type. What is the way to accomplish this? Thank you. ...

difference between DateTime and DateTime2

Possible Duplicate: SQL Server datetime2 vs datetime What is the difference between DbType.DateTime and DbType.DateTime2 in .NET? If I am using DbType.Date and I want to change to a DateTime type should I use DateTime or DateTime2? ...