我一直听说C++不是面向对象而是"C with Classes".所以,当我向面试官提到C++并不是真正的面向对象时,他问我为什么不认为它是一种OO语言.自从大学以来我没有做过任何C++,而且我没有太多答案.C++是否面向对象?为什么?
我正在尝试调用一个存储过程,该过程接受一个带有一个字符串和一个日期时间列的表值参数。
存储过程
ALTER PROCEDURE [dbo].[uspStoredProcedureDateTimeTableValueTest]
-- Add the parameters for the stored procedure here
@Param DateTimeType READONLY
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
END
Run Code Online (Sandbox Code Playgroud)
电视节目:
CREATE TYPE DateTimeType AS TABLE
(
Name nvarchar(50),
ModifiedDate datetime
)
Run Code Online (Sandbox Code Playgroud)
.NET 控制台应用程序:
static void Main(string[] args)
{
string connectionString = ConfigurationManager.ConnectionStrings["default"].ConnectionString;
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
DataTable table = new DataTable("Test");
table.Columns.Add("ModifiedDate", typeof(DateTime));
table.Columns.Add("Name", typeof(string));
DataRow …Run Code Online (Sandbox Code Playgroud)