Below is the code and I recieve no errors but it write mo data in the response.write?
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=SQLOLEDB;Server=SERVER\SQLEXPRESS;Database=GE_Data;Trusted_Connection=yes;"
Conn.Open
sql = "SELECT Sum(Cost)-Sum(Credit) AS SumCx FROM [LedgerD] Where [LedgerD].[ProjectID]=" & strProjectID & " And [LedgerD].[MethodID] = " & 1 & ""
rs.open sql, conn, 3, 3
Response.Write(SumCx)
set rs = Server.CreateObject ("ADODB.Recordset")
Set conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=SQLOLEDB;Server=SERVER\SQLEXPRESS;Database=GE_Data;Trusted_Connection=yes;"
Conn.Open
sql = "SELECT Sum(Cost)-Sum(Credit) AS SumCx FROM [LedgerD] Where [LedgerD].[ProjectID]=" & strProjectID & " And [LedgerD].[MethodID] = " & 1 & ""
rs.open sql, conn, 3, 3
Response.Write(SumCx)