通过建立SqlCommandBuilder来自动生成的,要想查看代码,如下:
SqlCommandBuilder thisbuilder = new SqlCommandBuilder(thisadapter);
Console.WriteLine("输出thisadapter的显示命令:");
Console.WriteLine(thisadapter .SelectCommand .CommandText );
Console.WriteLine("输出thisadapter的删除命令:");
SqlCommand thiscommand = thisbuilder.GetDeleteCommand();
Console.WriteLine();
Console.WriteLine("输出thisadapter的更新命令:");
thiscommand = thisbuilder.GetUpdateCommand();
Console.WriteLine();
Console.WriteLine("输出thisadapter的插入命令:");
thiscommand = thisbuilder.GetInsertCommand();
Console.WriteLine();
不知对你是否有帮助。。