以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 后台数据无法写入  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=101518)

--  作者:2900819580
--  发布时间:2017/6/1 22:05:00
--  [求助] 后台数据无法写入
如下代码,MessageBox可以正常显示 ,但是数据 无法写入后台,,,数据库是Sql。

Dim fi As String = "单据编号 = \'SEORD006441\'"

Dim dt As DataTable = DataTables("订单表")

Dim dr As DataRow = dt.SQLFind(fi)
If dr IsNot Nothing Then
    Dim st As String = "|审核日期"
           MessageBox.Show(dr("单据编号")) \'显示SEORD006441
    Dim tx() As String
    tx = st.Split("|")
    dr("更改更新") = True
    dr("更改原因") = "修改"
    For ii As Integer = 0 To tx.Length -1
        If tx(ii) > "" Then
            MessageBox.Show(tx(ii)) \'显示 审核日期
           \' MessageBox.Show(r(tx(ii)))
            dr(tx(ii)) = Date.Today \'#2017-05-23#
        End If
    Next
End If

--  作者:有点色
--  发布时间:2017/6/1 23:11:00
--  

最后要save

 

Dim fi As String = "单据编号 = \'SEORD006441\'"


Dim dt As DataTable = DataTables("订单表")

Dim dr As DataRow = dt.SQLFind(fi)
If dr IsNot Nothing Then
    Dim st As String = "|审核日期"
    MessageBox.Show(dr("单据编号"))
    Dim tx() As String
    tx = st.Split("|")
    dr("更改更新") = True
    dr("更改原因") = "修改"
    For ii As Integer = 0 To tx.Length -1
        If tx(ii) > "" Then
            MessageBox.Show(tx(ii)) \'显示 审核日期
            dr(tx(ii)) = Date.Today \'#2017-05-23#
        End If
    Next
    dr.save
End If