Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
On Error Resume Next
If UsernameTextBox.Text = "" Or PasswordTextBox.Text = "" Or SystemTextBox.Text = "" Then
MsgBox("Please Insert A User Name And/Or Password.", vbExclamation, "Error!")
Exit Sub
What do I Do using VB.net in adding the data to the Plog.mdb Is their some way to do a SQL Statement to Insert the record.
In VB6 I would do the following:
Module1
Global mrstDB As New ADODB.recordset
then do like this:
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
On Error Resume Next
If UsernameTextBox.Text = "" Or PasswordTextBox.Text = "" Or SystemTextBox.Text = "" Then
MsgBox("Please Insert A User Name And/Or Password.", vbExclamation, "Error!")
Exit Sub
mrstDB.AddNew()
mrstDB("User") = UsernameTextBox.Text
mrstDB("Password") = PasswordTextBox.Te
mrstDB("System") =SystemTextBox.Text
mrstDB.Update()
Unload(Me)
End If
End Sub
Add Data to Ms Access DatabaseI dont know how to add data
Page 1 of 1
2 Replies - 8502 Views - Last Post: 19 September 2008 - 03:01 PM
#1
Add Data to Ms Access Database
Posted 19 September 2008 - 07:38 AM
Hello I very new ath VB.Net I've created a Login database using MS Access. I need to add new users to the database. I've created the input form and have was able to connect to ythe data base. here is my code.
Replies To: Add Data to Ms Access Database
#2
Re: Add Data to Ms Access Database
Posted 19 September 2008 - 01:01 PM
ADO has changed a lot with .NET. You want to look at the ADO.NET Connection, DataAdapter, Command, DataReader, Dataset, DataTable objects. You can find them in the System.Data namespace. I not 100% sure but I also don't think VS express allows access to ADO.NET, so if you are using the free version you may need to upgrade.
#3
Re: Add Data to Ms Access Database
Posted 19 September 2008 - 03:01 PM
you can check out the tutorial section here to get you started as well
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|