<% '============= Create and Open Database Connection ============= 'OPEN THE DATABASE If blnConnectToDB Then dim blnDBconnectionDown blnDBconnectionDown = false Err.Clear on error resume next set dbConn = Server.CreateObject("ADODB.Connection") 'Open the Connnection 'dbConn.Open Application("dbConn_ConnectionString") dbConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews" ''New Error trapping. KC added 2/23/2012 If Err.Number <> 0 Then ''Response.Write (Err.Description& "

") dbConn.Close Set dbConn = nothing blnDBconnectionDown = true End If On Error GoTo 0 ''error trapping not working here KC removed 2/23/2012 ''tmpDBErrorNativeError = 0 '' For Each dbErr In dbConn.Errors '' strErrMsg = strErrMsg & _ '' "Source: " & dbErr.Source & vbCrLF & _ '' "Description: " & dbErr.Description & vbCrLF & _ '' "SQL State: " & dbErr.SQLState & vbCrLF & _ '' "NativeError: " & dbErr.NativeError & vbCrLF & _ '' "Number: " & dbErr.Number & vbCrLF & vbCrLF '' tmpDBErrorNativeError = dbErr.NativeError '' Next '' If (dbConn.Errors.Count > 0) AND (tmpDBErrorNativeError <> 5703) Then '' dbConn.Close '' Set dbConn = nothing '' blnDBconnectionDown = true '' Response.write(strErrMsg) '' Response.end '' End If dim arrErrors() Redim arrErrors(2,0) End If '============================================================== Public Function GetRS2(myCommand) On Error GoTo 0 'objConn: local connection object 'objRS: local recordset object 'objComm: command object passed in to the function Dim objConn, objRS, blnErrorLogged, objComm 'Create the command object Set objComm = Server.CreateObject("ADODB.Command") Set objComm = myCommand 'Create the connection object Set objConn = Server.CreateObject("ADODB.Connection") 'Open the connection object objConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews" 'Set the active connection objComm.ActiveConnection = objConn 'Create the recordset object Set objRS = Server.CreateObject("ADODB.Recordset") 'Set the cursor location for disconnected recordsets 'objRS.CursorLocation = adUseClient 'Turn on error handling for just a second ' On Error Resume Next 'Open the recordset 'objRS.Open SQL, objConn, adOpenStatic, adLockOptimistic Set objRS = objComm.Execute 'Response.Write "State = " & objRS.State & "
" 'objRS.MoveLast 'objRS.MoveFirst 'Response.Write "Count = " & objRS.RecordCount & "
" 'Response.End 'Check for an error ' If Err.Number <> 0 Then ' Response.Write "Database Error Occured

" ' Response.Write "Error #" & Err.Number & "
" ' Response.Write Err.Description & "

" ' Response.Write "SQL:
" ' Response.Write SQL ' Response.End ' End If 'Turn off error handling ' On Error GoTo 0 'Disconnect the recordset 'Set objComm.ActiveConnection = Nothing 'Close the connection 'objConn.Close 'Set the connection to Nothing 'Set objConn = Nothing 'Set the Command to Nothing 'Set objComm = Nothing 'Return the recordset Set GetRS2 = objRS On Error Resume Next End Function '=============================================================== Function GetRS(sSQL) 'Declarations dim rs 'Create Recordset Object set rs = Server.CreateObject("ADODB.Recordset") If blnConnectToDB Then 'Open Recordset based on SQL rs.Open sSQL, dbConn, 1, 3, 1 End If 'Return Recordset set GetRs = rs End Function '=============================================================== Function ExecSQL(sSQL) 'Open the Command Object dim lRecordsAffected dbConn.Execute sSQL, lRecordsAffected 'Return the Records Affected ExecSQL = lRecordsAffected End Function '======================================================================== Function sendEmail(strFrom,strTo,strSubject,strMessage) Dim sch ' Schema sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(sch & "sendusing") = 2 .Item(sch & "smtpserver") = "mxrelay.doe.gov" .update End With Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = strFrom .To = strTo .Subject = strSubject .TextBody = strMessage .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing End Function Function removeBadChars(tmpString) tmpString = Replace(tmpString , "<", "") tmpString = Replace(tmpString , ">", "") tmpString = Replace(tmpString , "'", "") tmpString = Replace(tmpString , """", "") tmpString = Replace(tmpString , ";", "") tmpString = Replace(tmpString , "(", "") tmpString = Replace(tmpString , ")", "") removeBadChars = tmpString End Function %> <% 'If there is a mobile version of this site, check the user_agent, and forward to 'the mobile version of the site (unless cookie or querystring var is set) if "true" = "true" then tmpSeeFullPage = Mid(Request.Querystring("m"),1,1) if ((isMobile) and (tmpSeeFullPage <> "1")) then tmpMobileURL = Request.servervariables("HTTP_URL") tmpMobileFileName = mid(tmpMobileURL, InStrRev(tmpMobileURL, "/")+1) tmpMobileURL = Left(tmpMobileURL, InStrRev(tmpMobileURL, "/")) tmpMobileURL = tmpMobileURL & "m/" & tmpMobileFileName Response.Clear Response.Redirect(tmpMobileURL) end if end if %>

<% ''This code is strictly when a user clicks on a left nav and needs to be forwarded to another site/program/office if ("" <> "") then Response.Clear Response.Redirect ("") end if %>

Landfill Gas Resources and Technologies

Photo of a bulldozer on top of a large trash mound in a landfill with a cloudy sky in the backdrop.

Methane and other gases produced from landfill decomposition can be leveraged for energy.

This page provides a brief overview of landfill gas energy resources and technologies supplemented by specific information to apply landfill gas energy within the Federal sector.


Landfill gases are a viable energy resource created during waste decomposition. Landfills are present in most communities. These resources can be tapped to generate heat and electricity.

As organic waste decomposes, bio-gas is produced made up of roughly half methane, half carbon dioxide, and small amounts of non-methane organic compounds. The methane can be collected, converted, and used as an energy source instead of releasing it into the atmosphere or flaring it.

The collected methane can be burned to generate thermal energy for heating applications. It can also be burned to create steam, which can then be used to drive a turbine that generates electricity. Using methane in these applications helps keep it out of the atmosphere, reducing air pollution.

Federal Application

Before conducting an assessment or deploying landfill gas energy technologies, Federal agencies must evaluate a series of questions.

What are my energy goals?

Energy goals range from meeting regulatory requirements to powering remote applications to increasing energy security. Landfill gases, if applied properly, are suitable for each.

  • Regulatory Requirements: Electricity produced by landfill gases fall under the Energy Policy Act (EPAct) of 2005 definition of renewable energy and can be used to meet EPAct 2005 renewable energy requirements. However, landfill gases for thermal energy do not meet the EPAct 2005 renewable energy definition or requirements. This thermal power, however, can be used to meet other Federal laws and regulations. For example, if the facility was put into service after January 1, 1999, it can be used to meet Executive Order 13423 requirements for new renewable energy.

  • Remote Power: Landfill gases are dependent on landfill locations and are typically not appropriate in size or scope for remote power applications.

  • Energy Security: Landfill gases are viable renewable energy resources found in almost every community across the U.S. It is a predictable energy resource that can reduce utility peak demand for increased energy security.

What kind of energy do I use?

Federal agencies must understand what type of energy is used before determining if landfill gases are applicable. Landfill gases can be used for electricity or thermal applications.

When do I need the energy?

Even with substantial recycling and reuse programs, landfill waste is inevitable in most communities. As such, it is a dependable and predictable resource that can typically be used on-demand, around the clock.

How much power do I use/need to produce?

Landfill gas technologies can generate varying amounts of electricity and thermal energy depending on the size of the technology deployment and landfill itself. It is important to consult an expert for a professional evaluation to plan accordingly.

Is a landfill available?

Landfill gas energy applications are dependent on landfill resources. For this application, Federal facilities must be in close proximity to local landfills. Most applications have a landfill within 5 miles, but 10 miles may be acceptable if the right conditions exist (e.g., quality of gas, volume, cost of competing fuel). Be sure to check with facility resources as well as municipal and county landfill contacts to see if implementing landfill gas technologies is possible for your facility.

Is this a building- or campus-scale project?

Landfill gas renewable energy technologies are ideally suited for small to large campuses. Implementing a landfill gas system for a standalone building or facility is typically not cost-effective.

What is my budget?

It is important to consult an expert for a professional evaluation to see if landfill gas energy fits into your current budget.

What resources are available for operations and maintenance?

Landfill gas technologies require ongoing operations and maintenance. It is important to factor these operations and maintenance costs and staffing needs in any facility energy management plan.

Next steps

Visit the project planning section for detailed information on planning and deploying renewable energy projects. Federal case studies are available to provide specific examples of viable landfill gas energy projects.


Detailed information on landfill gas energy resources and technologies is available through: