.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

OdbcDataAdapter FillSchema

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net
 

Hi,

   query:
     if 1=1
       Select '1' as RowType, 'abc' as Cust_ID 
    else
       Select '1' as UserInfoID, 'abfd' as UserName

  Before using OdbcDataAdapter.FillSchema(dataSet, SchemaType.Mapped), dataSet only has 'RowType', 'Cust_ID' columns. 
 But after using
OdbcDataAdapter.FillSchema(dataSet, SchemaType.Mapped), dataSet will has four columns 'RowType', 'Cust_ID', 'UserInfoID', 'UserName'.


  query:
     if 1 = 2
       Select '1' as RowType, 'abc' as Cust_ID 
    else
       Select '1' as UserInfoID, 'abfd' as UserName
 
after using
OdbcDataAdapter.FillSchema(dataSet, SchemaType.Mapped), dataSet will has two columns 'UserInfoID', 'UserName'.

I don't know why. Can anyone give me help?
Thanks for your attention.

Best Regards.

 




View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend