惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
V
Vulnerabilities – Threatpost
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
G
GRAHAM CLULEY
S
Securelist
P
Palo Alto Networks Blog
MongoDB | Blog
MongoDB | Blog
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
B
Blog RSS Feed
C
Cisco Blogs
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
K
Kaspersky official blog
D
Docker
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
T
Tenable Blog
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
H
Help Net Security
L
LINUX DO - 热门话题
T
The Exploit Database - CXSecurity.com
Jina AI
Jina AI
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
美团技术团队
腾讯CDC

博客园 - 天下

[转]开始PFC之旅行 查询同一表内多字段同时重复记录的SQL语句 数据库设计中的14个关键技巧收藏[转] 走出海量数据及访问量压力困境收藏[转] 大型网站架构设计[转] (转)各主要数据库的连接串 - 天下 - 博客园 SQL Anywhere 10 关于 COMMIT 掉数据的问题 - 天下 vs2005水晶报表页面打开数据库登录框提示取消方法[转] PD12.5 生成 PB 中table的扩展属性 - 天下 Asp.net2.0回发或回调参数无效问题的解决 datagrid格式变乱解决方案---------------网页内强制折行与不折行的解决方案 Report Service 为用户“NT AUTHORITY、NETWORK SERVICE”授予的权限不足,无法进行此操作。(rsAccessDenied)处理 [转]SQL Server一些常见性能问题的总结 SQL SERVER 添加序号列 sharepoint Site Data Web 服务中的错误。 (0x80042616)PortalCrawl Web 服务中的错误。 (0x80042617)处理 TFS的TF31004:错误 创建WebPart时的数据库连接问题。 Visual Studio 2005 Team Foundation Server Trial Edition下载 Team Foundation Server架设之删除项目
.net2.0 +asa 10 连接程序
天下 · 2008-12-27 · via 博客园 - 天下

.net2.0 +asa 10

用的实在是少!
网上找了一大圈都没有!
只有自己看帮助

 1 Code
 2         string psword = "", namer = "", users = "";
 3 
 4         try
 5 
 6        {
 7             _conn = new SAConnection("DBN=asa;UID=DBA;PWD=sql");
 8             _conn.Open();
 9             //连接字符串
10             SACommand cmd_client = new SACommand("SELECT Password,name,[user] FROM client where [User] = " + UserName.Text, _conn);
11 
12             SADataReader dr = cmd_client.ExecuteReader();
13             //注意下面这么写法是通不过的!SYBASE 之变态,帮助之烂,方法也不写清楚,示例也没有,只有参考的程序
14             //string users = dr.GetChar(2).ToString();
15             //循环读出
16             while (dr.Read())
17             {
18                 psword = dr.GetString(0);
19                 namer = dr.GetString(1);
20                 users = dr.GetString(2);
21             }
22             string Url;
23             dr.Close();
24             if (users == null || users == String.Empty)
25             {
26 
27                 //提示错误("无此用户或者密码错误!");
28 
29 
30             }
31             else
32             {
33                 if (psword != Password.Text)
34                 {
35                     //提示错误("用户或者密码错误!");
36                 }
37                 else
38                 {
39                     //保存登陆信息
40                     FormsAuthentication.SetAuthCookie(users, false);
41                     HttpContext.Current.Session["loginuser"= users;
42                     HttpContext.Current.Session["loginname"= namer;
43                     if (Request.QueryString["ReturnUrl"!= null)
44                     {
45                         Url = Request.QueryString["ReturnUrl"];
46                         HttpContext.Current.Response.Redirect(Url);
47                     }
48                     else
49                     {
50                         //内部的一个方法
51                         Url = WuLiu.BLL.Globals.ApplicationVRoot + "/Index/Index.htm";
52                         OpenWindow(Url);
53                     }
54 
55                 }
56             }
57         }
58         catch (SAException ex)
59         {
60             //提示错误("连接失败")
61         }
62 
63