codice:Dim dbcerca As OleDbCommand = New OleDbCommand("Select Max(numero) as num from documenti where anno=" & Year(Now), conn) dbcerca.CommandType = CommandType.Text Try cerca = dbcerca.ExecuteReader() Catch ex As Exception Exit Sub End Try
codice:Dim dbcerca As OleDbCommand = New OleDbCommand("Select Max(numero) as num from documenti where anno=" & Year(Now), conn) dbcerca.CommandType = CommandType.Text Try cerca = dbcerca.ExecuteReader() Catch ex As Exception Exit Sub End Try