I want to create a table in my MySQL database using Visual Studio 2010:
1) In the server explorer I right click on Tables and select: Create Table.
2) In the design view I add the fields of the table.
3) The first row should become my primary key, so when I right click on that row I am expecting to be able to set the primary key, but nothing happens.
How to fix this? What am I doing wrong?
PS:
-Connection version:5.1.55-community
-Connection type: MySQL
-Connection provider: .NET Framework Data Provider for MySQL
-I installed MySQL Connector Net 6.3.6, but with 6.0 and 6.3.0 I had the same problem.
Chade888
Member
47 Points
46 Posts
setting the primary key by right clicking on the table's new row doesn't work
Jun 01, 2011 10:36 PM|LINK
I want to create a table in my MySQL database using Visual Studio 2010:
1) In the server explorer I right click on Tables and select: Create Table.
2) In the design view I add the fields of the table.
3) The first row should become my primary key, so when I right click on that row I am expecting to be able to set the primary key, but nothing happens.
How to fix this? What am I doing wrong?
PS:
-Connection version:5.1.55-community
-Connection type: MySQL
-Connection provider: .NET Framework Data Provider for MySQL
-I installed MySQL Connector Net 6.3.6, but with 6.0 and 6.3.0 I had the same problem.
Lannie
Contributor
3742 Points
730 Posts
Re: setting the primary key by right clicking on the table's new row doesn't work
Jun 01, 2011 10:41 PM|LINK
what table or grid control are you using?
Most grid controls have properties and methods for managing the primary key,
such as changing your primary key column to a LINK or BUTTON;
but to manage the link or button click event
you will have to write code to manage the event, read the key, and then pass it to your database.
Chade888
Member
47 Points
46 Posts
Re: setting the primary key by right clicking on the table's new row doesn't work
Jun 01, 2011 10:50 PM|LINK
I am talking about a table inside a database... not about a html <table> or grid.
Chade888
Member
47 Points
46 Posts
Re: setting the primary key by right clicking on the table's new row doesn't work
Jun 01, 2011 10:57 PM|LINK
Like this, but with right clicking the selected row, I can set the primary key
Chade888
Member
47 Points
46 Posts
Re: setting the primary key by right clicking on the table's new row doesn't work
Jun 02, 2011 12:22 PM|LINK
I am now using dbForge for MySQL in Visual Studio to create MySQL tables, set primary keys, etc....
But getting errors now when adding LINQ to SQL Classes / ADO.NET Entity Data Model... see my next threads.