Results 1 to 2 of 2

Thread: Update, delete 2 different database table in Gridview

  1. #1
    New Member
    Join Date
    Oct 12
    Posts
    1

    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.

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 07
    Location
    Land Down Under
    Posts
    1,256

    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
  •