Stocks were slightly higher on Wednesday as strong labor market data offset the impact of continued high oil prices.

Private employers added 217,000 jobs in February, according to the ADP Employer Services report, far more than forecast, in what could be a positive sign for Friday's non-farm payrolls data. There has been little correlation between the two reports in recent months.

Energy remained a focus as Libyan leader Muammar Gaddafi launched an offensive against rebels, sending oil up 0.7 percent above $100 per barrel.

Equities have had a strong inverse relationship with oil in the past several weeks on concerns that rising prices could slow economic growth.

The ADP report is giving us some strength right now, but the real question is how long oil will stay at these levels, especially going into the summer, which is seasonally strong for demand, said Rich Ilczyszyn, a market strategist with Lind-Waldock in Chicago.

The Dow Jones industrial average <.DJI> was up 30.84 points, or 0.26 percent, at 12,088.86. The Standard & Poor's 500 Index <.SPX> rose 3.10 points, or 0.24 percent, at 1,309.43. The Nasdaq Composite Index <.IXIC> gained 10.39 points, or 0.38 percent, at 2,747.80.

Staples Inc slid 0.8 percent to $20.70 after it forecast earnings slightly below expectations.

On the upside, Texas Instruments Inc gained 3.4 percent to $36.20 after JPMorgan upgraded the semiconductor sector, including TI, saying an inventory correction was nearing an end and demand appeared to be improving.

(Editing by Jeffrey Benkoe)