[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 915
  • Last Modified:

Coding Table Adapter in ASP.NET

I am using ASP.NET + VB, and a MySQL DB to develop a web application.
I would like to create Table Adapter to bound object data source and Grid view to the adapters.
I want for the adapter typically to have a select, update, and delete method....
But i cannot use the designer to do so, (as if the application was using a SQL Server Epress DB),
So i guess i need to write the code for the adpaters....

Can someone please tell me how i can proceed:
A sample code of the adapter.
A method to follow
BTW :What is the adapter should be a function in a class?...
thanks a lot
  • 2
  • 2
2 Solutions

The advantage of using designer is it will create all the native functions along with correct datatype for all the columns including setting up null values, function to check nulls, etc..

For creating Table Adapters using code, you have to manually create all the commands i.e. SelectCommand, InsertCommand, UpdateCommand and DeleteCommand and pass the parameters for all the Command Parameters.
Datasets and Data Adapters in C# .NET

Building a DAL using Strongly Typed TableAdapters and DataTables in VS 2005 and ASP.NET 2.0
Nyana22Author Commented:
but i am using a MySQL database,
When i create a new table adapter in the designer i cannot connect to the database, i cannot see the connection string...
However it's in the web.config file!
Can i use the designer with a MySQL DB?

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now