Invoking CLR stored procedures

前端 未结 5 1649
广开言路
广开言路 2021-01-16 15:08

In short, where can I find C#/VB client side sample code that calls CLR stored procedure with some argumnet [like a sqlxml data] and receives a datareader or other f

5条回答
  •  轮回少年
    2021-01-16 15:15

      // Create a record object that represents an individual row, including it's metadata.
          SqlDataRecord record = new SqlDataRecord(new SqlMetaData("stringcol", SqlDbType.NVarChar, 128));
    
          // Populate the record.
          record.SetSqlString(0,( "Hello World!" + System.DateTime.Now));
    
          // Send the record to the client.
          SqlContext.Pipe.Send(record);
    

提交回复
热议问题