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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:46:37+00:00 2026-05-23T06:46:37+00:00

I am using MySQL database to work in ASP.NET MVC 3, i’ve already set

  • 0

I am using MySQL database to work in ASP.NET MVC 3, i’ve already set up all requirements and connection is working fine. This code below is working properly and produce right result :

        try
        {
            ViewBag.Model = (from n in _db.mainDatas
                             where n.time_stamp == new DateTime(2010, 11, 3, 0, 0, 15) 
                             select n).Take(10).ToList();
        }catch (Exception e) {
            ViewBag.Error = e;
        }

But when i change this code into :

        DateTime test = new DateTime(2010,11,3,0,0,15);
        try
        {
            ViewBag.Model = (from n in _db.mainDatas
                             where n.time_stamp == test  
                             select n).Take(10).ToList();
        }catch (Exception e) {
            ViewBag.Error = e;
        }

this error message is generated :

MySql.Data.MySqlClient.MySqlException: Fatal error encountered during command execution. —> MySql.Data.MySqlClient.MySqlException: Unable to serialize date/time value

I am using MySQL Connector/Net 6.3.6. Any solution to this problem ?

  • 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-05-23T06:46:37+00:00Added an answer on May 23, 2026 at 6:46 am

    Ok, after doing some searches and googling like crazy, finally I found the solution for my problem. Well, it’s not a solution actually, because it looks like MySQL Connector/Net 6.3.6 is not doing well with my project (maybe because of my server, database, project configurations, etc) so I use Devart dotConnector instead of MySQL Connector/Net 6.3.6 and everything works like magic. 😀

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

Sidebar

Related Questions

I've been playing around with using MySql as the membership provider for asp.net mvc
I'm using ASP.NET C# with database MYSQL, I follow this step on creating a
I'm using a MySQL database and accessing it through Java. PreparedStatement prep1 = this.connection.prepareStatement(
I'm trying to use EntityFramework to work with MySQL database from c#. I'm using
I'm using MySQL Connector to retrieve data from a mySQL database to a .NET
I am currently using the EntityFramework to bind my ASP.NET MVC project to a
I am using the Ado.Net Entity Framework with ASP.NET MVC. In my MSSQL 2008
I'm an ASP.NET developer who has used Microsoft SQL Server for all my database
We intend to use mysql stored procedures for handling all database work for one
I have created a MySQL database using MySQL Workbench. It has about 20 tables.

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.