Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8420607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:55:10+00:00 2026-06-10T02:55:10+00:00

I have created a Web Service in Visual Studio 2005, using VB .NET language.

  • 0

I have created a Web Service in Visual Studio 2005, using VB .NET language. This Web Service interacts with a database on Sql Server through ADO .NET.
Using ADO .NET I get one table with this code

    conn = New SqlConnection(Utilities.ConnectionString)
    sqlcmd = New SqlClient.SqlCommand()
    sqlcmd.Connection = conn
    sqlcmd.CommandType = CommandType.Text
    sqlcmd.CommandText = "select * from myTable" 
    da = New SqlClient.SqlDataAdapter()
    da.SelectCommand = sqlcmd
    table = New DataTable()
    da.Fill(table)

where Utilities is a class created by me for managing and return ConnectionString.
The table myTable contains more than one field of String type and just one field of datetime named LastChangeDate.
I want select all the dates found in the rows of myTable so I use this code:

     Dim d As DateTime 
     For Each row In table.Rows
          d = row.Item("LastChangeDate")
          '
          ' other codes for managing the retuned dates
          '

The problem is that after this operation d contains NULL value.

What can I do for convert correctly the datetime returned from Item method into DateTime in VB .NET

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:55:11+00:00Added an answer on June 10, 2026 at 2:55 am
    dim isDate as Boolean
    dim lastChangeDate as Date
    
    isDate = Date.TryParse(row.Item("LastChangeDate"), lastChangeDate)
    If isDate Then
      '** code that should work with the extracted date ...
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a C# web service using visual studio to stop the windows
I have created a dummy web service with 2 optional parameters using the .Net
Trying to do basic SSL-authenticated Web Service using Visual Studio 2008 .NET 3.5 Service
I have a web service created using Apache CXF, and two .NET clients using
I have a very simple ASP.NET web application created under Visual Studio 2008 (SP1),
I created a web service using visual studio and tested it, it works fine.
I have tried to create a hello world Web Service using visual studio 2008,
I have created Web-Service in asp.net with c# . Now i want to pass
I have created a Java web service and I am trying to access this
I have created a simple web-service using Java. i want to load jars related

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.