Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/08/2005, 21:25
Avatar de numbloq
numbloq
 
Fecha de Ingreso: marzo-2004
Ubicación: Capital Federal
Mensajes: 124
Antigüedad: 20 años, 2 meses
Puntos: 0
conexion a base en SQL SERVER 2000

yo pongo es te simple codigo no?
Código:
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<HTML>
	<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
SqlConnection conexion = new
SqlConnection("Server=localhost;Database=pubs;User ID=pepe;Password=123");
SqlDataAdapter comando = new SqlDataAdapter("select * from Titles", conexion);
DataSet ds = new DataSet();
comando.Fill(ds, "Titles");
repiteDatos.DataSource = ds.Tables["Titles"].DefaultView;
repiteDatos.DataBind();
}
	</script>
	<body>
		<asp:Repeater id="repiteDatos" runat="server">
			<HeaderTemplate>
				<table width="100%" style="font: 8pt verdana">
					<tr bgcolor="ff00d8">
						<th>
							Título</th>
						<th>
							Unidades</th>
						<th>
							Fecha publicación</th>
						<th>
							Ventas</th>
						<th>
							Precio</th>
					</tr>
			</HeaderTemplate>
			<ItemTemplate>
				<tr bgcolor="FFECD8">
					<td><%# DataBinder.Eval(Container.DataItem, "titulo") %></td>
					<td align="right">
						<%# DataBinder.Eval(Container.DataItem, "unidades","{0:#,###}") %>
					</td>
					<td align="right">
						<%# DataBinder.Eval(Container.DataItem, "fecha","{0:m}") %>
					</td>
					<td align="right">
						<%# DataBinder.Eval(Container.DataItem, "ventas","{0:g}") %>
					</td>
					<td align="right">
						<%# DataBinder.Eval(Container.DataItem, "precio", "{0:0#.00} €") %>
					</td>
				</tr>
			</ItemTemplate>
			<FooterTemplate>
				</table>
			</FooterTemplate>
		</asp:Repeater>
	</body>
</HTML>
y nada, me tira este error choto

Login failed for user 'pepe'. Reason: Not associated with a trusted SQL Server connection.

ya no se que hacer, le di todos los permisos al pepe y nada, me estoy volviendo loco...
Gracias por cualquier info
__________________
que el erlenmeyer carezca de tapa no es un problema que me aconte