Solved

sqlserver + timespan column datatype

Posted on 2007-04-04
3
2,762 Views
Last Modified: 2012-08-13
I'm using sqlserver and I have
One Column in a Table   whose DataType  is Timespan

How can I retrieve  Timespan Column  Value  on the Form using VB.Net

e.g:
txtcode.text=myDataReader("code")
txtname.text=myDataReader("name")
txttimespan.text=myDataReader("timespancolumn")

0
Comment
Question by:sohrabus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
Sham Haque earned 500 total points
ID: 18849248
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=182986&SiteID=1

"SQL Server 2005 does not support timespan datatypes directly.

You can wrap the CLR timespan type using the SQL CLR functionality and provide a cast that accepts the string format..."
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question