Shares of Sanmina-SCI ( SANM - Get Report) skyrocketed Wednesday after the electronics manufacturing-services company posted improving quarterly results and issued optimistic guidance for the current quarter.

In recent trading, the stock was up 26.5%, or $1.07, to $5.11 as more than 45 million shares traded hands. The stock normally trades about 6.5 million shares daily.

A flurry of generally positive commentary, including a boost in its rating by one analyst, also gave the stock momentum.

"We believe that conditions at SANM have improved to where they warrant a revisiting by investors," Needham analyst Richard Kugele wrote in a Wednesday note, upgrading the stock to buy and setting a 12-month price target of $6.

His improved outlook on the company is based on Sanmina completing restructuring plans that are starting to yield higher margins, a broader customer diversification and mix, better efficiencies and business-demand conditions within its core EMS operation and longer lead times across most sectors of the business. Needham makes a market in Needham shares.

"The company believes that its core EMS business has turned around, with an improving customer and product mix and a more encouraging pipeline," Kugele wrote. "Guidance reflects this optimism, particularly on the gross margin line."

Sanmina reported its highest gross margin in 19 quarters at 6.2%.

"In terms of the big picture, it was a fairly positive report," said Richard Stice, equity analyst with Standard & Poor's. He reiterated his hold recommendation and increased his full-year EPS by a nickel to 30 cents, including stock-options expenses. He upped his 12-month price target to $5 from $4.50.

He also was encouraged that the company seems to be at the end of its restructuring, and noted that revenue in most of its markets, like medical, industrial defense, automotive and multimedia, is showing signs of strength. Sanmina's communications business was down a little bit, but there are encouraging signs that it will pick up again, he said.

For the second quarter, Sanmina lost $103.4 million, or 20 cents a share, compared with a loss of $1.04 billion, or $1.99 a share, a year ago. The current results include a $112.2 million one-time charge associated with the early retirement of the company's high-yield notes, due in 2010.

A year ago, the company's results suffered because of a goodwill-impairment charge of $600 million, among other items.

Excluding items, net income for the quarter was $30.5 million, or 6 cents a share, compared to $29.3 million, or 6 cents a share, over the same period last year. On this basis, the company was consistent with consensus estimates.

Sanmina reported $2.67 billion in revenue, down from a year ago, when the company's sales totaled $2.89 billion. Revenue was a shade higher than Thomson First Call estimates of $2.66 billion.

Sanmina forecast a net income between 8 cents and 10 cents a share, excluding items, for the current quarter, higher than the average consensus estimate of 7 cents. Sales will be between $2.7 billion and $2.8 billion, in the range of what analysts are looking for at $2.77 billion.