请问这份文件正确吗?(.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