Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
ASP.NET 2.0 / 3.5 / 4.0
Iserimento dati
sabato 09 giugno 2012 - 21.00
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
drugomatera
Profilo
| Newbie
2
messaggi | Data Invio:
sab 9 giu 2012 - 21:00
ciao a tutti , il mio problema è il seguente :
devo inserire una mail presa da un form in un database access usando oledb ... al momento dell inserimento vorrei che si controllasse se la mail è già presente nel database . come posso fare ? si può usare l' oggetto datareader o cosa ? grazie
Mau67
Profilo
| Expert
917
messaggi | Data Invio:
dom 10 giu 2012 - 15:05
Ciao prova con questo
Dim objDataAdapter As New MySqlDataAdapter( _
"SELECT count (Email)from TUA TABELLA Where Email = '" & TextBox1.Text & "'", Connection)
' Initialize a new instance of the DataSet object...
objDataSet = New DataSet()
' Fill the DataSet object with data...
objDataAdapter.Fill(objDataSet, "TUA TABELLA")
Dim rw As DataRow
For Each rw In objDataSet.Tables("TUA TABELLA").Rows
If rw.Item(0) = 0 Then
Try
'QUI METTI LA INSERT
Catch ex As Exception
End Try
Else
MsgBox("Email già presente")
ciao ciao
Mau67
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !