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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:12:24+00:00 2026-05-28T00:12:24+00:00

I had to rebuild a machine here and thought I’d just redo my web

  • 0

I had to rebuild a machine here and thought I’d just redo my web site in the process. I decided to go with mvc 3 but still use mysql on the back end.

I essentially copied and pasted all of my old code for the sql connection to return results from a mysql stored procedure and it’s not working at all. I then tried creating a simple insert sproc and it doesn’t work either. If I use in-line sql on my MySqlCommand, it works fine however (both selecting and inserting). I’m thinking that with .net 4.0 they changed something on the CommandType.StoredProcedure…but I can’t say for sure.

When I put a breakpoint on my command call to the actual sproc, it doesn’t show anything, nor does it actually do anything. I’ve called the sprocs from the CLI and they’re working just as they should. Back to what I was saying, I’m guessing that with .net 4, it doesn’t use the “Call” command any more. Anyone run into this issue? If so, do you have a solution? Is there anyway to import the System.Data 2.0 dll into a .net 4.0 project to verify what I’m thinking?

here’s some code on my database layer:

public static BuyCollectionModel GrabBuyData(GridSettings gridSettings)
        {
            int totalRows = 0;
            BuyCollectionModel buys = new BuyCollectionModel();
            using (MySqlConnection myConnection = new MySqlConnection(AppConfig.Connection))            {

                //string sql = "SELECT 100 as totalrows, c.* FROM cBuys as c";
                //MySqlCommand myCommand = new MySqlCommand(sql, myConnection);

                MySqlCommand myCommand = new MySqlCommand("usp_GetBuys", myConnection);
                myCommand.CommandType = CommandType.StoredProcedure;
                myCommand.Parameters.AddWithValue("@startrowvar", gridSettings.PageIndex);
                myCommand.Parameters.AddWithValue("@endrowvar", gridSettings.PageSize);
                myCommand.Parameters.AddWithValue("@sortcolvar", gridSettings.SortColumn);
                myCommand.Parameters.AddWithValue("@sortordervar", gridSettings.SortOrder);
                myConnection.Open();
                using (MySqlDataReader myReader = myCommand.ExecuteReader())
                {
                    while (myReader.Read())
                    {
                        buys.Add(FillBuys(myReader, out totalRows));
                    }
                }
                myConnection.Close();
            }
            buys.TotalCount = totalRows;
            return buys;
        }

as mentioned above, I’ve also tried creating a simple insert sproc that works fine from the CLI, but when I call it from code using ExecuteNonQuery(), it does nothing…

  • 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-28T00:12:24+00:00Added an answer on May 28, 2026 at 12:12 am

    Try reverting to an older version of the connector. One that works for me is 6.3.4. Also, make sure you are using the exact same version on the server as on your dev workstation.

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

Sidebar

Related Questions

I had just thought I resolved a problem , but it seemed another one
So just this week I had the opportunity to re-build my development machine and
Had a good search here but can't see anything that gets my mind in
I had to rebuild my machine and went from XP to Windows 7. I've
My development machine died and I've had to rebuild it from scratch. I reinstalled
I have a WordPress 3.1.3 site that was hacked, so I decided to rebuild
I had no problems using NHaml with ASP.NET MVC Beta, but when upgrading to
Had to download Command Line Tools from Apple to get make to work, but
Had a good read through similar topics but I can't quite a) find one
So we're having some issues deploying an ASP.NET MVC app to a client site.

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.