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

Photovoltaic Resources and Technologies

Graphic of the eTraining logo

Training Available
Selecting, Implementing, and Funding Photovoltaic Systems in Federal Facilities
: Learn how to select, implement, and fund a photovoltaic system by taking this FEMP eTraining course.

This page provides a brief overview of photovoltaic (PV) technologies supplemented by specific information to apply PV within the Federal sector.


Photovoltaic cells convert sunlight into electricity. Systems typically include a PV module or array made of individual PV cells installed on or near a building or other structure. A power inverter converts the direct current (DC) electricity produced by the PV cells to alternative current (AC) electricity.

PV systems can be found across the globe, from the most isolated locations to the heart of the largest cities. A typical PV cell converts approximately 10% of the solar energy striking its surface into usable electricity.

Visit the Department of Energy's (DOE) Solar Technologies Program for in-depth information about solar energy basics and technologies.

Federal Application

Photo of a long PV panels on top of a parking garage in a suburban area. Cars are also pictured next to the PV panels.

The Naval Air Station North Island has an unusual parking garage; a structure covered with approximately 81,470 square feet of PV panels that produce more than 1 million kilowatt-hours of power each year.

Photo of numerous PV arrays aligned in a mountainous region with a house in the background and a bird flying overhead.

The Fish and Wildlife Service installed this PV system at its Farallon National Wildlife Refuge.

PV arrays are viable sources of renewable energy in the Federal sector. Before conducting an assessment or deploying PV systems, 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. PV systems, if applied properly, are suitable for each.

  • Regulatory Requirements: Electricity produced by solar energy falls under the Energy Policy Act (EPAct) of 2005 definition of renewable energy and can be used to meet EPAct 2005 renewable energy requirements.

  • Remote Power: PV arrays can stand alone to provide intermittent power for remote applications, or be coupled with wind turbines, battery storage systems, backup generators, or other energy resources to deliver around the clock power for remote applications.

  • Energy Security: Solar energy is natural and renewable. The energy source is found in abundance across the U.S. and can be leveraged to increase energy continuity.

What kind of energy do I use?

Federal agencies must understand what type of energy is used before determining if photovoltaics are applicable. PV systems generate electricity and are not appropriate for mechanical or thermal power.

When do I need the energy?

Although solar resources can be quite predictable, PV cannot be guaranteed to generate power where and when it is demanded like a fossil fuel generator. For example, PV arrays must be connected to energy storage or backup equipment to provide electricity when sunlight is not available (e.g., evenings).

How much power do I use/need to produce?

The size and nature of an electric load must be well understood to properly select a packaged PV system or to design and specify a custom system. For any system, the following must be known:

  • Maximum energy needed at any one time (watts)
  • Maximum daily power requirements (kilowatt-hours)
  • Availability of solar resources
  • Cost of power alternatives

Typical photovoltaic systems deployed by the Federal Government range from several watts to 1.1 megawatts.

Photo of numerous roof-mounted PV arrays on a building in front of a suburban backdrop.

This 127 kilowatt PV system, one of the largest roof-integrated Federal systems nationwide, generates electricity for the Postal Service's Marina Processing and Distribution Center.

Where am I located?

For a broad overview of your facility's solar resources, the National Renewable Energy Laboratory (NREL) provides solar energy resource maps of the U.S. Before initiating a project, solar resources in your area must be measured and verified. Resource maps are a good start, but resources vary at a micro level. It is important to consult an expert for a professional evaluation before implementing energy projects.

Is there rooftop or open land available?

Photovoltaic arrays are typically installed on building rooftops or adjacent to where the electricity is needed. If these areas are not available, PV may not be the best solution. It is important to consult an expert to determine whether PV arrays are a good fit for your Federal facility.

What is my budget?

The installation cost of PV varies greatly depending on the application, system size, and whether it is prepackaged and preassembled or separate components that need to be integrated into a structure on site.

What resources are available for operations and maintenance?

Photovoltaic systems require very little maintenance. Most small PV systems take no more than 2 to 4 hours per year to maintain. A visual inspection of the system and simple battery maintenance should occur every 3 to 6 months.

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 solar energy projects.


Detailed information on solar energy resources and technologies is available through: