首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

请教这份文件正确吗?(.cs)

2012-04-12 
请问这份文件正确吗?(.cs)usingSystemusingSystem.DatausingSystem.Data.SqlClientpublicclassztx{void

请问这份文件正确吗?(.cs)
using   System;
using   System.Data;
using   System.Data.SqlClient;

public   class   ztx
{
        void   page_Load()
        {
                string   strConnection   =   " ";
                strConnection   =   "server=127.0.0.1; ";
                strConnection   +=   "database=ztx;uid=sa;password=wxj; ";
                string   strSql   =   "seelct   i_id,i_caption   from   content ";
                SqlConnection   sqlConnection2   =   new   SqlConnection(strConnection);
                SqlCommand   sqlCommand2   =   new   SqlCommand(strSql,   sqlConnection2);

                zhangtianxing.DataSource   =   sqlCommand2.ExecuteReader(CommandBehavior.CloseConnection);
                zhangtianxing.DataBind();
        }
}

如果正确,那么该如何调用?

[解决办法]
string strSql = "seelct i_id,i_caption from content ";改成:
string strSql = "select i_id,i_caption from content ";
[解决办法]
??
ls的想说什么
[解决办法]
lz的意思是什么哦?
[解决办法]
up

热点排行