Ojo que mi SQL si funciona ya lo probe en el query analyzer
Código PHP:
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="facturas_cliente.aspx.vb" Inherits="Facturas.facturas_cliente"%>
<HTML>
<HEAD>
<title>facturas_cliente</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
dim cn as new sqlconnection
Dim dap As SqlDataAdapter
cn= New SqlConnection("server=localhost;" _
& "database=dbdata;Trusted_Connection=Yes")
' Connect to the SQL database using a SQL SELECT query to get all
' the data from the "Titles" table.
dap= New SqlDataAdapter("SELECT * FROM facturas where cliente=64", cn)
' Create and fill a DataSet.
Dim ds As DataSet = new DataSet()
dap.Fill(ds)
' Bind MyDataList to the DataSet. MyDataList is the ID for
the DataList control in the HTML section of the page.
MyDataList.DataSource = ds
MyDataList.DataBind()
End Sub
</script>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<%-- Open the DataList control and set it for two columns, to be
filled in horizontal order. --%>
<ASP:DataList id="MyDataList" RepeatColumns="1" RepeatDirection="Horizontal" runat="server" ShowHeader="False"
ShowFooter="False">
<ItemTemplate>
<DIV style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; FONT-SIZE: 10pt; PADDING-BOTTOM: 15px; PADDING-TOP: 15px; FONT-FAMILY: Verdana">
<DIV style="FONT: 12pt verdana; COLOR: darkred"><I><%# DataBinder.Eval(Container.DataItem, "id")%></I></B></DIV>
<BR>
<B>Title ID: </B>
<%# DataBinder.Eval(Container.DataItem, "nro_factura") %>
<BR>
<B>Category: </B>
<%# DataBinder.Eval(Container.DataItem, "cliente")%>
<BR>
<B>Publisher ID: </B>
<%# DataBinder.Eval(Container.DataItem, "estado") %>
<BR>
</DIV>
</ItemTemplate>
</ASP:DataList>
</form>
</body>
</HTML>