locked
Update SQL Database from VB.NET RRS feed

  • Question

  • I have a database designed in SQL Server 2008, my database contains a table named “memberships”. It has some fields such as ID, Coupon Code, First Name, Last Name, Address, Email, Telephone, Member Since, Member Until.

    We have a vb.net application that will show a form in which user will fill up all the information.

    In above database two fields - ID and Coupon code, data has already been entered for 500 records and remaining fields are blank.

    This is because when a customer has got a coupon code from our reception and when he enter his coupon code in vb.net form, vb.net application will make a connection to the database and search whether or not the coupon code entered by the user exist in the record or not, if record does not exist then present a message box that the user entered an invalid code, but if the coupon code matches then, the information provided by the user with the coupon code such as First Name, Last Name, Address, Email, Telephone, Member Since, Member Until should be updated to the record whose “Coupon Code” value matches the code that user entered, without disturbing other blank records in the table.

    One more thing – Member Since and Member Until have date datatype. When user enter valid code then “Member Since” record should be updated with the current system date, and “Member Until” should have the value of 1 year, means if Member Since value is 1/07/2012 then Member Until value will be 1/07/2013.

     

    How do I make a program which can do the above work for me ?

    Any help will be appreciated.

    Monday, July 9, 2012 3:26 PM

Answers