Hi all,
I am doing a simple application which is to create a register form which I am not quite sure. To stored the data, I am using the MS Access. Hope that anyone could help me.
Thanks
Regards
LiL_Is
Hi all,
I am doing a simple application which is to create a register form which I am not quite sure. To stored the data, I am using the MS Access. Hope that anyone could help me.
Thanks
Regards
LiL_Is
Jump to PostDrop some textboxes, labels, and buttons controls onto the form. Use ADO.NET class library to work with any database product.
Drop some textboxes, labels, and buttons controls onto the form. Use ADO.NET class library to work with any database product.
Hi,
But the problem is I am doing the behind code. Could you help me?
Thanks
Regards
LiL_Is
Show us your source code. I will not help you if source code is posted without bb code tags. code
Dim conn As New OleDb.OleDbConnection
conn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\1B09158\My Documents\User.mdb"
conn.Open()
'Dim logCommand As SqlCommand = conn.CreateCommand
'Dim cmd As OleDbCommand = New OleDbCommand("Imsert into customers values(@custName,@Address,@Position,@CompanyName,@Email,@Telephone,@Industry)", conn)
'cmd.Parameters.AddWithValue("@custName", TextBox1.Text)
'conn.Close()
Dim cmd As OleDbCommand = New OleDbCommand("Customers", conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@CustName", OleDbType.VarChar, 60)
cmd.Parameters("@CustName").Value = TextBox1.Text
cmd.Parameters.Add("@Address", OleDbType.VarChar, 70)
cmd.Parameters("@Address").Value = TextBox2.Text
cmd.Parameters.Add("@Position", OleDbType.VarChar, 40)
cmd.Parameters("@Position").Value = TextBox3.Text
cmd.Parameters.Add("@CompanyName", OleDbType.VarChar, 50)
cmd.Parameters("@CompanyName").Value = TextBox4.Text
cmd.Parameters.Add("@Email", OleDbType.VarChar, 200)
cmd.Parameters("@Email").Value = TextBox5.Text
cmd.Parameters.Add("@Telephone", OleDbType.VarChar, 15)
cmd.Parameters("@Telephone").Value = TextBox6.Text
cmd.Parameters.Add("@Industry", OleDbType.VarChar, 40)
cmd.Parameters("@Industry").Value = ComboBox1.SelectedValue
'cmd.ExecuteNonQuery()
conn.Close()
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.