'============= Create and Open Database Connection =============
'OPEN THE DATABASE
If blnConnectToDB Then
blnDBconnectionDown = false
on error resume next
set dbConn = Server.CreateObject("ADODB.Connection")
'Open the Connnection
dbConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews"
''New Error trapping. KC added 2/23/2012
If Err.Number <> 0 Then
''Response.Write (Err.Description& "
Set dbConn = nothing
blnDBconnectionDown = true
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
'' If (dbConn.Errors.Count > 0) AND (tmpDBErrorNativeError <> 5703) Then
'' Set dbConn = nothing
'' blnDBconnectionDown = true
'' 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 & "
'Response.Write "Count = " & objRS.RecordCount & "
'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
' End If
'Turn off error handling
' On Error GoTo 0
'Disconnect the recordset
'Set objComm.ActiveConnection = Nothing
'Close the connection
'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
'Create Recordset Object
set rs = Server.CreateObject("ADODB.Recordset")
If blnConnectToDB Then
'Open Recordset based on SQL
rs.Open sSQL, dbConn, 1, 3, 1
set GetRs = rs
'Open the Command Object
dbConn.Execute sSQL, lRecordsAffected
'Return the Records Affected
ExecSQL = lRecordsAffected
Dim sch ' Schema
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserver") = "mxrelay.doe.gov"
Set cdoMessage = CreateObject("CDO.Message")
Set .Configuration = cdoConfig
.From = strFrom
.To = strTo
.Subject = strSubject
.TextBody = strMessage
Set cdoMessage = Nothing
Set cdoConfig = Nothing
tmpString = Replace(tmpString , "<", "")
tmpString = Replace(tmpString , ">", "")
tmpString = Replace(tmpString , "'", "")
tmpString = Replace(tmpString , """", "")
tmpString = Replace(tmpString , ";", "")
tmpString = Replace(tmpString , "(", "")
tmpString = Replace(tmpString , ")", "")
removeBadChars = tmpString
'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
- Site Map
- Printable Version
tmpTitle = "Federal Energy Management Program: Model Acquisition Language for Energy-Efficient Product Contracts"
''Added the following code to make EERE news/events items work with the embedded addthis code.
strQueryString = ""
if request.servervariables("QUERY_STRING") <> "" then
strQueryString = "%3F" & Server.HTMLEncode(request.servervariables("QUERY_STRING"))
if inStr(LCase(tmpTitle), "newsdetail") > 0 Then
tmpTitle = replace(tmpTitle, "NewsDetail", "News")
if inStr(LCase(tmpTitle), "eventsdetail") > 0 Then
tmpTitle = replace(tmpTitle, "EventsDetail", "Event")
arrAddThis = Array("email", "facebook", "twitter", "google", "delicious", "digg")
arrAddThisDesc(0) = "Send a link to " & tmpTitle & " to someone by E-mail"
arrAddThisDesc(1) = "Share " & tmpTitle & " on Facebook"
arrAddThisDesc(2) = "Tweet about " & tmpTitle & " on Twitter"
arrAddThisDesc(3) = "Bookmark " & tmpTitle & " on Google"
arrAddThisDesc(4) = "Bookmark " & tmpTitle & " on Delicious"
arrAddThisDesc(5) = "Rank " & tmpTitle & " on Digg"
- this resource
''This code is strictly when a user clicks on a left nav and needs to be forwarded to another site/program/office
if ("" <> "") then
Model Acquisition Language for Energy-Efficient Product Contracts
Energy-Efficient Federal Purchasing: This intermediate FEMP eTraining course offers hands-on learning on finding, specifying, and selecting energy-efficient products.
Energy-Efficient Product Procurement: This introductory FEMP First Thursday Seminar details executive order and Federal Acquisition Regulation requirements for purchasing FEMP-designated and ENERGY STAR products.
Federal agencies must insert specific contract language for Energy Efficiency in Energy-Consuming Products as defined in Federal Acquisition Regulation (FAR) Section 52.223-15 in solicitations and contracts when ENERGY STAR®-qualified or FEMP-designated energy-consuming products are:
- Acquired by the contractor for use in performing services at a Federally-controlled facility
- Furnished by the contractor for use by the Government
- Specified in the design of a building or work, or incorporated during its construction, renovation, or maintenance
This is true unless the agency is exempt as defined in FAR Section 23.205.
The following model language is defined in FAR Section 52.223-15:
ENERGY EFFICIENCY IN ENERGY-CONSUMING PRODUCTS (DEC 2007)
(a) Definition. As used in this clause—
(1) Means a product that—
(i) Meets Department of Energy and Environmental Protection Agency criteria for use of the Energy Star® trademark label; or
(ii) Is in the upper 25 percent of efficiency for all similar products as designated by the Department of Energy's Federal Energy Management Program.
(2) The term "product" does not include any energy-consuming product or system designed or procured for combat or combat-related missions (42 U.S.C. 8259b).
(b) The Contractor shall ensure that energy-consuming products are energy efficient products (i.e., ENERGY STAR products or FEMP-designated products) at the time of contract award, for products that are—
(2) Acquired by the Contractor for use in performing services at a Federally-controlled facility;
(3) Furnished by the Contractor for use by the Government; or
(4) Specified in the design of a building or work, or incorporated during its construction, renovation, or maintenance.
(c) The requirements of paragraph (b) apply to the Contractor (including any subcontractor) unless—
(1) The energy-consuming product is not listed in the ENERGY STAR Program or FEMP; or
(2) Otherwise approved in writing by the Contracting Officer.
(d) Information about these products is available for—
(1) ENERGY STAR at http://www.energystar.gov/products; and
(2) FEMP at www.femp.energy.gov/technologies/eep_purchasingspecs.html.
(End of clause)
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, which are provided below as Adobe Acrobat PDFs.