Update, delete 2 different database table in Gridview
How can i update, delete 2 table in gridview?
I have created 2 table in access
1. Recipient (Userid, RecipientId, RecipientName, Company, DeliveryAddressId)
2. MailingAddress (Id, BuildingInfo, StreetInfo, City, Province)
I connected this gridview with sqldatasource
"SELECT Recipient.UserId, Recipient.RecipientId, Recipient.RecipientName, Recipient.Company, MailingAddress.BuildingInfo, MailingAddress.StreetInfo, MailingAddress.City, MailingAddress.Province FROM (Recipient INNER JOIN MailingAddress ON Recipient.DeliveryAddressId = MailingAddress.Id)"
The gridview it can select from 2 table, (RecipientId, RecipientName, Company, BuildingInfo, StreetInfo, City, Province)
but cannot update 2 table.
How can i do?
I am using VB2010 and Access 2010.
Re: Update, delete 2 different database table in Gridview
The sqlDataSource is used more for proof of concept not in production and I don't know how your using it with Access.. I thought it would be a oledbDataSource (sql object prefix is for sqlSever, oledb prefix is for file base dataStores like Access). You really need to learn ADO.NET to develop sites with databases and asp.net. The ado objects like connection, command, dataReader, dataSet, dataAdapter etc are what you need to be able to work with in code, Note again prefix those object names with oledb or sql according to the dataStore your using.