<% '============= 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 %> <% 'initialize getPageFormVars(). This function is for printable versions of .asp pages that pass form variables function getPageFormVars() getPageFormVars = "" end function %> Federal Energy Management Program: Municipal Solid Waste Resources and Technologies

U.S. Department of Energy: Energy Efficiency and Renewable Energy

Federal Energy Management ProgramTechnologies

Site Navigation ↓
<% '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 %>

Municipal Solid Waste Resources and Technologies

Black and white photo of a bulldozer pushing a large mound of trash in a landfill.

The National Renewable Energy Laboratory's high-solids digester converts wastes to biogas and compost for energy production.

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

Overview

Municipal solid waste, also known as waste to energy, generates electricity by burning solid waste as fuel. This generates renewable electricity while also incinerating landfill and other municipal waste products such as trash, yard clippings and debris, furniture, food scraps, and other discarded items.

The U.S. currently uses two waste to energy facility designs:

Incinerating municipal solid waste generates energy while reducing waste volumes by as much as 90% with ash disposal and air polluting emissions as the primary environmental impacts. Effective environmental management is needed to remove toxins prior to combustion to minimize pollutants.

Federal Application

Before conducting an assessment or deploying 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.

What kind of energy do I use?

Federal agencies must understand what type of energy is used before determining if municipal solid waste is applicable. Municipal solid waste can be used for electricity production.

When do I need the energy?

Even with substantial recycling and reuse programs, municipal solid 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?

Municipal solid waste technologies generate varying amounts of electricity depending on the size of both the technology deployment and urban area itself. It is important to consult an expert for a professional evaluation to plan accordingly.

Where am I located?

Before initiating a project, resources in your area must be measured and verified. It is important to consult an expert for a professional evaluation before implementing municipal solid waste energy projects.

Is a landfill available?

Municipal solid waste energy applications are dependent on landfill and other urban waste resources. For this application, Federal facilities should be in close proximity to local landfills. The steam plant should be within 1 mile if steam is being transferred from the municipal solid waste plant to a Federal facility. If the waste is being transported to the Federal facility as fuel, the distance will vary depending on the volume and quality of fuel needed. Typically, a 100 mile or less collection radius is necessary. Be sure to check with facility resources, as well as municipal and county landfill contacts, to see if implementing municipal solid waste technologies is possible for your facility.

Is this a building- or campus-scale project?

Municipal solid waste renewable energy technologies are well suited at the campus level. Implementing a municipal solid waste 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 municipal solid waste energy fits into your current budget.

What resources are available for operations and maintenance?

Municipal solid waste 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 energy projects.

Resources

Detailed information on municipal solid waste energy resources and technologies is available through:

Back to Top | ">View Full Site
Federal Energy Management Program Home | EERE Home
Webmaster | Search
Content Last Updated: 09/23/2013