My word. Do you want a list?
Why create this as an array, if you are only going to have a single element?
Dim f(0) As String
Why do you bother to read from a database, if when it doesn't work you default to zero and cause a problem later on?
Catch ex As Exception
adcode = 0
Why are you concatenating strings to make an SQL statement? Use parametrized queries, or loose your database to Little Bobby Tables...
cmd = New SqlClient.SqlCommand("insert into birthday(title,photo,namewithdate) values('" & TextBox1.Text & "','" & f1 & "','" & TextBox2.Text & "')", sqlcon)
Why do you have a loop?
For i = 0 To 0
How many times will this be executed?
I could go on, but that code is making me feel queasy...