juz wanna check is this the correct way to integrate the database(access) to my vb.net. cos when i try it, it doesnt work.
and when i wanna view(eg.customer particular record) after pressing the view button, how can i do it..cos i try,but really cant work out..can i know wat code is required to view the records
can anyone please help me..thanks
is this the rite code to integrate the database.
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\assignment\My Documents\Assignmenttwo.mdb"
Dim MySQL As String = "INSERT INTO Customer(CustomerName,CustomerAddress,CustomerPostCode,CustomerGender,CustomerContactNo,CustomerDOB,CustomerIC) VALUES('" & txtName.Text & "','" & txtAddress.Text & "'," & txtPcode.Text & ",'" & cboGender.ValueMember & "','" & txtContactNo.Text & "','" & txtDOB.Text & "','" & txtIC.Text & "')"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(MySQL, MyConn)
MyConn.Open()
and when i wanna view(eg.customer particular record) after pressing the view button, how can i do it..cos i try,but really cant work out..can i know wat code is required to view the records
can anyone please help me..thanks
is this the rite code to integrate the database.
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\assignment\My Documents\Assignmenttwo.mdb"
Dim MySQL As String = "INSERT INTO Customer(CustomerName,CustomerAddress,CustomerPostCode,CustomerGender,CustomerContactNo,CustomerDOB,CustomerIC) VALUES('" & txtName.Text & "','" & txtAddress.Text & "'," & txtPcode.Text & ",'" & cboGender.ValueMember & "','" & txtContactNo.Text & "','" & txtDOB.Text & "','" & txtIC.Text & "')"
Dim MyConn As New OleDbConnection(strConn)
Dim cmd As New OleDbCommand(MySQL, MyConn)
MyConn.Open()