这个原来是SqlServer的数据库,现在改成MySQL的,由于两个数据库有些差别。在程序中怎么处理。为了给自己提个醒,把它记录下来。
这是MySQL数据库
Public Sub display() Dim sql As String = "select CreatedDate from `Order`" Dim dt As DataTable = FneDAL.SqlHelper.ExecuteDataTable(sql) Dim i As Integer = dt.Rows.Count For Each dr As DataRow In dt.Rows Response.Write(dr("CreatedDate").ToString()) Next End Sub
这是SqlServer数据库
Public Sub display() Dim sql As String = "select CreatedDate from [Order]" Dim dt As DataTable = FneDAL.SqlHelper.ExecuteDataTable(sql) Dim i As Integer = dt.Rows.Count For Each dr As DataRow In dt.Rows Response.Write(dr("CreatedDate").ToString()) Next End Sub
仔细看,不然不会发现不同的。