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

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - 默默無語中

类与结构的区别 GridView分页-编辑-删除 DataList修改删除 - 默默無語中 - 博客园 [数据库连接字符串] SQL Server 2005 Compact Edition 连接字符串 委托对象(收集) 委托的笔记(整理) [导入]asp.net高级教程(三)-实战篇 [导入]asp.net高级教程(三)-对象 [导入]asp.net高级教程(五)-实战篇(中) [导入].NET之ASPWebApplication快速入门(3) [导入].NET之ASPWebApplication快速入门(2) [导入].NET之ASPWebApplication快速入门(1) [导入].NET之ASPWebApplication快速入门(4) [导入].NET之ASPWebApplication快速入门(5) [导入]asp.NET特写 [导入]亲密接触ASP.Net(1) [导入]亲密接触ASP.Net(3) [导入]亲密接触ASP.Net(4) [导入]亲密接触ASP.Net(2) [导入]亲密接触ASP.Net(6) [导入]亲密接触ASP.Net(5)
弄了一晚上研究连接字符串,给自己留个清楚的回忆~! - 默默無語中 - 博客园
默默無語中 · 2008-05-20 · via 博客园 - 默默無語中

数据库连接字符串:

    <connectionStrings>
  
<add name="AdventureWorksDWConnectionString" connectionString="Data Source=QQ123\SQL2005;Initial Catalog=AdventureWorksDW;Persist Security Info=True;User ID=sa;Password=7894561230."
   providerName
="System.Data.SqlClient" />
 
</connectionStrings>

在C#语句的连接方式语句:

    protected void Page_Load(object sender, EventArgs e)
    
{
        
if (!IsPostBack)
        
{
            
string con = ConfigurationManager.ConnectionStrings["AdventureWorksDWConnectionString"].ConnectionString;
            Label2.Text 
= con;

            SqlConnection conn 
= new SqlConnection(con);

            SqlDataAdapter asd 
= new SqlDataAdapter();
            asd.SelectCommand 
= new SqlCommand("select * from DatabaseLog", conn);
            DataSet ds 
= new DataSet();
            asd.Fill(ds, 
"emp");


            
this.GridView1.DataSource = ds.Tables["emp"];
            
this.GridView1.DataBind();
         

        }

}