\autoref doesn't do automatic capitalization, as the following example illustrates:
\documentclass{article}
\usepackage{listings}
\usepackage{hyperref}
\providecommand*{\lstnumberautorefname}{line}
\begin{document}
\section{Test}\label{sec:test}
\autoref{sec:test} and a period before the reference. \autoref{sec:test}
\begin{lstlisting} [escapeinside=||,numbers=left]
<sqlCallStatistics>YES</sqlCallStatistics>|\label{sdd_1}|
\end{lstlisting}
\autoref{sdd_1} and a period before the reference. \autoref{sdd_1}
\end{document}
You could use the cleveref package to have \cref (for lower case) and \Cref (for upper case):
\documentclass{article}
\usepackage{listings}
\usepackage{cleveref}
\begin{document}
\begin{lstlisting} [escapeinside=||,numbers=left]
<sqlCallStatistics>YES</sqlCallStatistics>|\label{sdd_1}|
\end{lstlisting}
\cref{sdd_1} and a period before the reference. \Cref{sdd_1}
\end{document}
Edit: As MWin123 commented: By default \cref turns only the number "1" into a hyperlink, while \autoref makes the whole "line 1" a clickable link. Fortunately there's an option nameinlink for it, i.e., you can use \usepackage[nameinlink]{cleveref}
\lstnumberautorefnamewith a lower case "l"? – Gonzalo Medina Nov 08 '11 at 19:56\autorefdoesn't do "auto capitalization". – Gonzalo Medina Nov 08 '11 at 20:03\ref-ing it. – Werner Nov 08 '11 at 20:05\Autorefmacro, which will locally redefine all of the\somethingautorefnames to a capitalized version? (Or, alternatively, just the one for the autoref target?) – einpoklum Jan 06 '12 at 09:25