conn=new  sqlconnection("server=localhost;uid=sa;database=pubs")  
 dr=new  sqldataadapter()  
后面加上
ds=new dataset()