<% '============= 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 %>

Resources on Energy-Efficient Product Procurement

Many helpful resources about energy-efficient product procurement are available.



  • Energy-Efficient Product Procurement: Introductory Federal Energy Management Program (FEMP) First Thursday Seminar details executive order and Federal Acquisition Regulation requirements for purchasing FEMP-designated and ENERGY STAR products.

  • Energy-Efficient Federal Purchasing: Intermediate FEMP eTraining course offers hands-on learning about finding, specifying, and selecting energy-efficient products.

Commit to Efficiency Campaign

FEMP provides resources and support for Federal government buyers and specifiers that pledge their commitment to energy efficiency. Learn more about the Commit to Efficiency campaign. Download the Commit to Efficiency Resource Kit.

Customized News Alerts
Sign up to receive the Energy Efficient Product Procurement (EEPP) newsletter and timely customized news alerts using FEMP's EEPP subscription system.


Sample Contract Language

In addition to the model language provided by FAR Section 52.223-15, FEMP provides sample contract language for specific product types, including:

  • Information Technology Products: Sample language Federal agencies can use in contracts specifying or purchasing energy-efficient information-technology products.

  • Construction Products: Sample language Federal agencies can use in contracts specifying or purchasing energy-efficient construction products.

Federal Product Supply Sources and Information

  • GSA Advantage!: Online shopping and ordering system that provides access to thousands of contractors and millions of products and services.

  • ENERGY STAR Purchase Energy-Saving Products: Website encourages corporations, institutions, and governments to procure ENERGY STAR-qualified and FEMP-designated products.

  • ENERGY STAR Product Purchasing and Computer Power Management for Federal Agencies: Website offers information about Federal requirements and resources surrounding energy-efficient products and power management.

  • DOD EMALL: Online resource for purchasers to find and acquire off-the-shelf, finished goods and services from the commercial marketplace and government sources. (Note: Access to Defense Logistics Agency websites requires enhanced security measures; civilian Federal agencies may have difficulty accessing these sites.)

Applications and Software

  • Compliance Certification Management System: Searchable database allows users to find product models with specific energy-efficiency levels based on manufacturer-submitted certification reports and compliance statements for covered products and equipment subject to Federal conservation standards.

  • Rooftop Unit Comparison Calculator: Online tool determines cost-effectiveness of an air conditioner (new installation or replacement) project.

  • MotorMaster+: Software helps determine the cost-effectiveness of motor replacement projects.

  • Building Life-Cycle Cost Programs: Software analyzes the cost-effectiveness of Federal energy and water conservation projects funded by agencies or financed through energy savings performance contracts or utility energy services contracts.

  • Commercial Buildings Resource Database: Website provides guides, case studies, webinars, software, tools, and other resources to help improve building energy efficiency.


For more information about energy-efficient product procurement, contact:

Amanda Sahl
Federal Energy Management Program

Christopher Payne
Lawrence Berkeley National Laboratory