How to write a program in Visual Basic to add, update, or delete records?
Kevin asked:
Okay, I’m about stressed to the limits right now, I’m trying to finish some projects for my class, and all of a sudden we’re getting thrown into using Visual Basic and Microsoft Access, both of which I have very limited knowledge of. We’ve never even had to use them in the class before, so I’m totally lost on this.
I’m supposed to be designing an interface with “control buttons that lead to students, instructors, courses, course schedules, and course rosters. Allow a user to add, update, or delete records in each area.”
I can do the design just fine, that’s not a problem, and I can add the new forms, and have them tied to buttons, etc, but I don’t even know where to begin to allow adding, updating, and deleting of records. She provided an Access Database, but she doesn’t want us to actually link to that DB, just to hard code the data into the project. If anyone could help or at least give me somewhere to start, that’d be awesome.
Sorry, that sounds like the right thing, but I’ve never written SQL code, where exactly am I supposed to put that code, and how do I insert a table?
I’m using Visual Studio.NET 2003
Related posts:
- Adding in hotkeys in a Visual Basic program? mad_genius575 asked: What line of code or whatever do I...
- What is will I use if i want to make a program in visual basic which ask for a username, password? Kenz asked: Im tying to make a project in visual...
- Visual Basic Programming Help? Bipul M asked: Does anyone know the code to save...
- How can I check if a file exists on the computer by a Visual Basic program? SB asked: I want to make a program that checks...
- Can i write BASIC or VISUAL BASIC programs on the internet? buckbucknumber2000 asked: I’d like to be able to write a...
Filed Under Programming & Design |
Tagged With Control Buttons, Microsoft, Visual Studio Net
Comments
One Response to “How to write a program in Visual Basic to add, update, or delete records?”
Provided you do not need an ODBC driver all you do is use SQL code to perform the task.
Add:
Insert into Table1
fields (data1, data2, data3, data4)
values :data1, :data2, :data3, :data4
Update:
Update Table1
Set data1 = :data1, data2 = :data2
Where keyfield = :key
Delete:
Delete * from table1
Where keyfield = :key