Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 02, 2011 12:22 PM by Chade888
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?
-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.
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.
Jun 01, 2011 10:50 PM|LINK
I am talking about a table inside a database... not about a html <table> or grid.
Jun 01, 2011 10:57 PM|LINK
Like this, but with right clicking the selected row, I can set the primary key
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.