Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:使用SQL语句生成数据表作为邮件内容

1楼
知鸟 发表于:2024/9/14 12:44:00
使用SQL语句生成数据表作为邮件内容

Dim m As New MailSender
m.Host = "smtp.qq.com"
m.Account = "xxx@xxx.com"
m.Password = "swyyxxxxabd"
m.From = "xxx@xxx.com"
m.EnableSsl = True 
m.Port= "25"
m.To ="xxx@xx.com"

m.Encoding = Encoding.UTF8
m.Title = "工作报告"
m.C
m.SendAsync()


Dim cmd As new SQLCommand
cmd.C
Dim dt As DataTable

Dim sql As String = "sel  ect form_id 表单编号,form_name 表单名称,eqp_id 设备编号,mat_id 物料编号,count(form_id) 点检记录数 ,count( case when isOutSpec = 1 then 1 end ) 超标记录数 from V_ems_checklist_reco where  " &  filter.trim("'") & " group by form_id,form_name,eqp_id,mat_id"
cmd.CommandText = sql
dt = cmd.ExecuteReader()
t1.DataSource = dt


2楼
有点蓝 发表于:2024/9/14 13:35:00
MailSender不支持这种功能,换种方法:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=108607&skin=0
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01953 s, 2 queries.