Narrative:

Flight following requested prior to departure with transponder code. On departure from hwd, right turn to lake chabot. Prior to lake chabot, xferred to oak tower, climbed through 3500 ft, inadvertently above oak airspace into class B for about 1/2-1 mi, then descended to 1900 ft. Worried if traffic, advised to make immediate climb left turn to avoid traffic. Observed a bonanza about 100 ft below. Near miss traffic was from right, I was northbound. It would be helpful if oak tower had originally given climb to altitude, may have helped me as to class B airspace, and may have helped to advise near miss, as the conflicting traffic could have been advised of my position, and likewise, I may have been advised sooner of the bonanza traffic.

Google
 

Original NASA ASRS Text

Title: GA PLT OFF HWD RECEIVING TA'S FROM OAK TWR INADVERTENTLY CLBS INTO AND OUT OF CLASS B AIRSPACE, AND HAD A NEAR MISS WITH A BONANZA.

Narrative: FLT FOLLOWING REQUESTED PRIOR TO DEP WITH XPONDER CODE. ON DEP FROM HWD, R TURN TO LAKE CHABOT. PRIOR TO LAKE CHABOT, XFERRED TO OAK TWR, CLBED THROUGH 3500 FT, INADVERTENTLY ABOVE OAK AIRSPACE INTO CLASS B FOR ABOUT 1/2-1 MI, THEN DSNDED TO 1900 FT. WORRIED IF TFC, ADVISED TO MAKE IMMEDIATE CLB L TURN TO AVOID TFC. OBSERVED A BONANZA ABOUT 100 FT BELOW. NEAR MISS TFC WAS FROM R, I WAS NBOUND. IT WOULD BE HELPFUL IF OAK TWR HAD ORIGINALLY GIVEN CLB TO ALT, MAY HAVE HELPED ME AS TO CLASS B AIRSPACE, AND MAY HAVE HELPED TO ADVISE NEAR MISS, AS THE CONFLICTING TFC COULD HAVE BEEN ADVISED OF MY POS, AND LIKEWISE, I MAY HAVE BEEN ADVISED SOONER OF THE BONANZA TFC.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.