CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    37

    Need help with coding

    I want to create a code in vb6 that will delete data from its database (Microsoft Access). The columns (attributes) in the database are CWNo, Name, IC No, Nationality, Company, Join Date and Expiry Date.
    Then it will insert data from a Microsoft Excel Sheet that contains the same attributes above.

    Can you please give me a hint on how I can do this? Maybe you can provide me with an algorithm or sth that will be useful for me to complete the task above.

  2. #2
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: Need help with coding

    You should be able to use the SQL Delete and Insert Statements on the Connection Object.

    Delete from [table] where [ColumnName] = [YourValue]

    Insert into [table] (column1, column2.....) values (value1, value2....)

    Build a string with the value above and pass the string in on the Execute method of the connection object.
    If you find my answers helpful, dont forget to rate me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured