Hi
I've written this code (that works) to inserts registration details into an Access 2010 DB from an aspx registration page.
How do I check for duplicates Email before inserting a new record into the DB
Dim strConn As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\InetPub\WWWRoot\BushHouseGibraltar\Bush.accdb;Persist Security Info=False;"
Dim MySQL As String = "INSERT INTO Reg " & _
"(Email,Title,FirstName,LastName,Address1,Address2,City,Phone) VALUES " & _
"('" & EmailAddress.Text & "','" & DropDownList1.Text & "','" _
& FirstName.Text & "','" & LastName.Text & "','" _
& Address1.Text & "','" & Address2.Text & "','" _
& City.Text & "','" & Phone.Text & "')"
Dim MyConn As New Data.OleDb.OleDbConnection(strConn)
Dim cmd As New Data.OleDb.OleDbCommand(MySQL, MyConn)
MyConn.Open()
cmd.ExecuteNonQuery()
MyConn.Close()
Thanks
ViRiPuFF