Foxtable(狐表)用户栏目专家坐堂 → ACCESS数据变化后不能在窗口即时反应


  共有7618人关注过本帖平板打印复制链接

主题:ACCESS数据变化后不能在窗口即时反应

帅哥哟,离线,有人找我吗?
today_ok
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:24 积分:428 威望:0 精华:0 注册:2012/3/23 20:53:00
ACCESS数据变化后不能在窗口即时反应  发帖心情 Post By:2012/5/22 14:19:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:2012-05-22_141533.jpg
图片点击可在新窗口打开查看

各位大侠,我的数据源是ACCESS,设计了一个窗口,第一次能加载数据,但窗口运行状态我更改了数据库的内容,在窗口运行状态点再次取数也不能取最新的数据,是怎么回事?

 

'第一步动态建立表一数据源
Dim a As new SQLCommand
a.ConnectionName=("taobao")
a.CommandText="select TradeId,TradeNo as 订单号 ,BuyerIdent as  淘宝ID, BuyerRemark as  订单备注,ReceiverState  as 省份,ReceiverCity   as 城市,ReceiverDistrict  as 镇区,ReceiverAddress  as 地址,ReceiverMobile  as 手机,ReceiverPhone  as 电话,ReceiverName  as 联系人,ReceiverZip  as 邮编,  StateDesc  as 订单状态,IIF(TransportType='free','包邮' ,'不包邮') as  邮费类型,GoodsAmount as 商品总数量,DiscountFee  as 折扣优惠,PostFee  as 邮费,TotalCash  as 现金实付总金额,GoodsMoney  as 商品总金额 ,'' as 是否存在 from {trade} where StateDesc  like '%买家已付款%' union all select TradeId,TradeNo as 订单号 ,BuyerIdent as  淘宝ID, BuyerRemark as  订单备注,ReceiverState  as 省份,ReceiverCity   as 城市,ReceiverDistrict  as 镇区,ReceiverAddress  as 地址,ReceiverMobile  as 手机,ReceiverPhone  as 电话,ReceiverName  as 联系人,ReceiverZip  as 邮编,  StateDesc  as 订单状态,IIF(TransportType='free','包邮' ,'不包邮') as  邮费类型,GoodsAmount as 商品总数量,DiscountFee  as 优惠金额,PostFee  as 邮费,TotalCash  as 总金额,GoodsMoney  as 商品金额 ,'' as 是否存在 from TradeHistory where StateDesc   like '%买家已付款%'  order by tradeid"
Dim b As DataTable
b=a.ExecuteReader()
Tables("网购接口_Table1").DataSource =b

 

这是我取数的语句,不知这样哪里不对了?


 回到顶部