Dim strInsert As String
Dim cmdInsert As OdbcCommand
Dim cn As OdbcConnection
cn = New _
OdbcConnection(ConfigurationSettings.AppSettings("ConnectionString"))
strInsert = "Insert into realestate.city_master(city_Name)Values(city_name);"
cmdInsert = New OdbcCommand(strInsert, cn)
cmdInsert.Parameters.Add("city_Name", city_name.Text)
cn.Open()
cmdInsert.ExecuteNonQuery()
city_name.Text = ""
cn.Close()