学习第十五天@多样无主题

问题:

如果使锚点又能执行函数又能跳转链接?

<a href=http://www.baidu.com onclick=”onTset();return true” >搜索</a>

问题:

如何使用游标?

例子

table1结构如下

id int

name varchar(50)

declare @id int

declare @name varchar(50)

declare cursor1 cursor for --定义游标cursor1

select * from table1 --使用游标的对象(跟据需要填入select文)

open cursor1 --打开游标

fetch next from cursor1 into @id,@name --将游标向下移1行,获取的数据放入之前定义的变量@id,@name中

while @@fetch_status=0 --判断是否成功获取数据

begin

update table1 set name=name+'1'

where id=@id --进行相应处理(跟据需要填入SQL文)

fetch next from cursor1 into @id,@name --将游标向下移1行

end

close cursor1 --关闭游标

deallocate cursor1

问题:

如何创建根据数据库创建ADO.Net实体数据模型?

在Model中添加类->在左边导航选择“数据”->找到“ADO.Net实体数据模型”

clip_image002

命名,确定。

选择或新建一个数据库连接。

OK。

clip_image003

接下来添加代码生成tt文件:

双击打开LearnMVC.edmx文件:

clip_image005

在空白处右键点击“添加代码生成”:

选择ADO.NET DbContext Generator:

clip_image007

tt文件生成:

clip_image008

点开cs文件,将会看到DbContext:

clip_image009

问题:

使用smtp.qq.com发送电子邮件,发现每次会超时,而且不能正常收到!

分析:没有开启pop3和smtp服务!

clip_image011

问题:

网易163免费邮箱相关服务器信息:

clip_image012

问题:

使用QQ的 SMTP功能:

mail from address must be same as authorization user

可能是 发信人地址和收信人地址写反了 或者是 发信人的邮箱是刚注册的

问题:

QQ邮箱的POP3SMTP服务器是什么?

QQ邮箱 POP3 和 SMTP 服务器地址设置如下:

邮箱

POP3服务器(端口110)

SMTP服务器(端口25)

qq.com

pop.qq.com

smtp.qq.com

SMTP服务器需要身份验证。

如果是设置POP3和SMTP的SSL加密方式,则端口如下:

POP3服务器(端口995)

SMTP服务器(端口465或587)。

原文地址:https://www.cnblogs.com/xiaxiazl/p/2354964.html