以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]主页设置权限出现错误。  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=179728)

--  作者:2900819580
--  发布时间:2022/9/6 9:30:00
--  [求助]主页设置权限出现错误。
老师代码如下:
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AddPageTitle("", "pageheader", Vars("SoftNm"), Vars("GSName"))
\'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Functions.Execute("LogText", "useid:" & e.Cookies("useid") & ",Pwd:" & e.Cookies("pwd") & ",Name:" & e.Cookies("name"))
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "SEL ECT DISTINCT FormName From {FormPw} where LimitItems is not null and useid = " = e.Cookies("useid")
Functions.Execute("LogText", "cmd.CommandText:" & cmd.CommandText)
Dim sdt As DataTable = cmd.ExecuteReader()
Dim FNmss As String = sdt.GetComboListString("FormName")
Functions.Execute("LogText", "GetComboListString" & fnmss)
Dim Fnms() As String = FNmss.Split("|")
Dim AGs() As String = {"销售订单管理", "客户管理", "物料管理"}
Dim Agnms() As String = {"销售订单", "客户管理", "物料管理"}
Dim Pngs() As String = {"order_159.png", "users.png", "IC1.png"}
Dim Pgs() As String = {"DDGL.htm", "KHGL.htm", "WLGL.htm"}
With wb.AddGrid("", "g1")
    For Agi As Integer = 0 To AGs.Length - 1 \' ag As String In AGs
        If Fnms.Contains(ags(Agi)) Then
            .Add(Agi , agnms(Agi), "./images/" & Pngs(Agi), pgs(Agi))
        End If 
    Next 
    .Add("B1", "考勤表", "./images/人员.png", "KQB.htm")
    .Add("c1", "退出", "./images/exit.png", "Exit.htm")
End With
e.WriteString(wb.Build)

LogText的错误内容如下:老师,就是红色加粗那里,为什么是False

e.Path =HomePage.htm,e.Host =127.0.0.1,e.Port = 80, 完整地址 = http://127.0.0.1/HomePage.htm
2022-09-06 09:22:37.9484
password:112233
2022-09-06 09:22:37.9624
useid:2,Pwd:112233,Name:郑
2022-09-06 09:22:37.9664
cmd.CommandText:False
2022-09-06 09:22:37.9764
找不到存储过程 \'False\'。
   在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
   在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   在 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
   在 System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   在 Foxtable.SQLCommand.ExecuteReader(Boolean Save)

2022-09-06 09:22:37.9844
调用的目标发生了异常。
   在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   在 Foxtable.UserFunctions.Execute(String Name, Object[] Args)
未将对象引用设置到对象的实例。
   在 UserCode.AMlt63PCZEvXtvcPl(Object[] Args)

--  作者:有点蓝
--  发布时间:2022/9/6 10:13:00
--  

cmd.CommandText = "SEL ECT DISTINCT FormName From {FormPw} where LimitItems is not null and useid = \'" & e.Cookies("useid") & "\'"

--  作者:2900819580
--  发布时间:2022/9/6 10:55:00
--  
谢谢老师,粗心了;