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 8538227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:05:33+00:00 2026-06-11T11:05:33+00:00

My connection string to the DB has the Allow Zero Datetime=True; The whole program

  • 0

My connection string to the DB has the Allow Zero Datetime=True; The whole program works perfectly, the only problem is that Date does not.

I tested the same program with an access DB and it works flawlessly. This issue only happens on MySQL DB that is necessary for my project.

This is an insert statement that I have only my DB under a history table

SqlVentaCasas = "INSERT INTO VentaCasasHistory (ID, Direccion, Estatus, Precio, " & _
                            "NumeroDias, FechaHoy, Agente, Compania, Unidad, Ciudad ) VALUES ('" & _
                            AddIDCasas2 & "','" & AddDireccionCasas2 & "','" & AddEstatusCasas2 & "'," & AddPrecioCasas2 & ", " & NumeroDiasCasas2 & " ,'" & _
                            Date.Today & "','" & AgenteNameCasas2 & "','" & AgenteCompaniaCasas2 & "', '" & AddUnidadCasas2 & "', '" & AddCiudadCasas2 & "' );"

The date shows as 0000-00-00 in my .net windows application. How can I resolve it?

  • 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-11T11:05:34+00:00Added an answer on June 11, 2026 at 11:05 am

    Try changing Date.Today to Date.Today.ToString("yyyy-MM-dd"). I believe the default date format is MM/dd/yyyy for Date.Today without any format string which MySQL may not like in this instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object that has a child collection: class Person { public string
I have the following connection string: Data Source=localhost\\SQLEXPRESS; , it complains that '' is
If a connection string specifies Trusted_Connection=true with SQL Server authentication mode, will performance of
How to save connection string in XML so that I can subsequently use that
I came across a problem while updating a typed DataTable that has a primary
I have an ASP.NET web application that has a fileupload control to allow users
I have a Person class which has a String collection of aliases representing additional
In connection string to SQL Server there is max pool size option. My question
I've checked the connection string (I got it from the server explorer). I've checked
heelo this is my connection string <connectionStrings> <add name=DefaultConnection connectionString=Data Source=.\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True providerName=System.Data.SqlClient;Password=;User

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.