Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

MySql.Data.MySqlClient.MySqlException: Duplicate entry '1' for key 'PRIMARY

$
0
0

Hi All

Iam  new in asp.net. I have followed the tutorial in asp.net mvc 4 for creating web app. When connecting with ms sql server i can enter many  view data.(works fine)

So my new scenario, i need to send data to mysql database. the problem comes when sending the second data.the application increment primary keys as the results a get a key duplicate error.

MySql.Data.MySqlClient.MySqlException: Duplicate entry '1' for key 'PRIMARY

I know mysql database handle autoincrement by default.

any assistance will be appreciated.


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>