|
-
Oct 2nd, 2012, 03:31 AM
#1
Thread Starter
New Member
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.
-
Oct 8th, 2012, 04:44 AM
#2
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.
The problem with computers is their nature is pure logic. Just once I'd like my computer to do something deluded. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|