Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
如果是后台数据库又该如何获得
用SQL语句
select max(_Identify) from 表A
Dim Filter As string
filter = "selece max([_Identify]) form {订单}"
DataTables("订单").LoadFilter = Filter
DataTables("订单").Load()
我想加载后台数据库最后一行的数据,这样为啥不行哦
我和你说要用SQL语句的嘛
Dim cmd As New SQLCommand
cmd.ConnectionName = "外部数据源名称"
cmd.CommandText = ""selece max([_Identify]) form {订单}"
cmd.ExecuteNonQuery()
DataTables ("订单").Load()
我和你说要用SQL语句的嘛
Dim cmd As New SQLCommand
cmd.ConnectionName = "test"
cmd.CommandText = "select max([_Identify]) form {订单}"
cmd.ExecuteNonQuery()
DataTables ("订单").Load()
还是不行的哟,错误是:至少一个参数没指定值
拖出去,打屁股
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "Select Max(编号) From {订单}"
cmd.ExecuteNonQuery()
DataTables ("订单").Load()
用这个仍然无法加载
嘿嘿,你的代码,逻辑不是不一般混乱,你是想加载编号最大的哪一行?
如果是的,应该这样:
Dim cmd As New SQLCommand
Dim id As Integer
cmd.ConnectionName = "test"
cmd.CommandText = "select max(编号) form {订单}"
id = cmd.ExecuteNonQuery()
DataTables ("订单").LoadFilter = "[编号] = " & id
DataTables ("订单").Load()