zoukankan      html  css  js  c++  java
  • 检索参数信息并填充指定的 SqlCommand 对象的 Parameters 集合

            private SqlParameterCollection GetSpParameters(string spName)
            {
                SqlCommand myCommand = new SqlCommand();
                myCommand.CommandText = spName;
                myCommand.CommandType = CommandType.StoredProcedure;
                
                myCommand.Connection = new SqlConnection("user id=sa;password=sa;data source=.;persist security info=True;initial catalog=数据库");
                myCommand.Connection.Open();

                SqlCommandBuilder.DeriveParameters(myCommand);

                return myCommand.Parameters;
            }
  • 相关阅读:
    POJ 1936 All in All
    POJ 2305 Basic remains
    POJ 2081 Recaman's Sequence
    MFC MDI 窗口函数执行顺序
    decompose
    不新建一个文档
    code mistake
    ...
    paper
    stereo
  • 原文地址:https://www.cnblogs.com/icebutterfly/p/2184290.html
Copyright © 2011-2022 走看看