| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 649 人关注过本帖
标题:怎么读不了数据库啊?
只看楼主 加入收藏
鬼首
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-8-2
收藏
 问题点数:0 回复次数:0 
怎么读不了数据库啊?
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="gb2312" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.SqlClient"%>
<script language="c#"runat="ktv">
void Page_Load(Object sender,EventArgse){
     SqlConnection Conn=new SqlConnection();
     Conn.ConnectionString="ktv=localhost;database=pubs;uid=sa;pwd="";
     Conn.Open();
     SqlCommadn Comm=new SqlCommand("select*from Authors",Conn);
     SqlDataReader dr=Comm.ExecuteReader();
     dg.DataSource=dr;
     dg.DataBind();
     Conn.Close();
     }
</script>
<asp:DataGrid id="dg"runat="ktv"/>
</body>
</html>
 麻烦告知一下那里错了?
搜索更多相关主题的帖子: Page 
2008-08-05 19:03
快速回复:怎么读不了数据库啊?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013325 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved