Dataset _dBSettings;
_dBSettings = SqlHelper.ExecuteDataset(_connectionString, CommandType.StoredProcedure, "usp_Get开发者_开发百科TCMSData");
I have DataSet
now it is an untyped dataset; it contains 10 tables. I want to assign to the untyped dataset to a typed dataset - how can I do that?
Like:
typeDs = _dBSettings;
You can't do an assignment between an untyped dataset and a typed one. A typed dataset is a class that is generated by the dataset designer. If you go to windows explorer and navigate to the folder with the typed dataset in it you'll see a number of files relating to your typed dataset, one of them will be a Designer.cs file. If you open that up you'll see something like
public partial class MyTypedDataSet : global::System.Data.DataSet
Basically you are going to have to write code to move the data from the untyped one to the typed one.
精彩评论