ASP.NET·ÀSQL×¢Èë½Å±¾³ÌÐò
public class SqlCheck
{
public SqlCheck()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
}
public SqlConnection oconn()
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["StudyConnectionString"].ToString();
//µÚ1ÖÖµ÷Óõķ½·¨ JK1986_CheckSql();
JK1986_CheckSql();
if ( conn.State == ConnectionState.Closed )
{
conn.Open();
}
return conn;
}
public DataTable getsource(string getds)
{
SqlConnection conn = oconn();
SqlDataAdapter da = new SqlDataAdapter(getds, conn);
DataSet ds = new DataSet();
da.Fill(ds,"news" );
return ds.Tables["news"];
 
Ïà¹ØÎĵµ£º
ÄÚÈÝÕªÒª£ºÔÚPL/SQL¿ª·¢¹ý³ÌÖУ¬Ê¹ÓÃSQL£¬PL/SQL¿ÉÒÔʵÏִ󲿷ݵÄÐèÇ󣬵«ÊÇÔÚijЩÌØÊâµÄÇé¿öÏ£¬ÔÚPL/SQLÖÐʹÓñê×¼µÄSQLÓï¾ä»òDMLÓï¾ä²»ÄÜʵÏÖ×Ô¼ºµÄÐèÇ󣬱ÈÈçÐèÒª¶¯Ì¬½¨±í»òij¸ö²»È·¶¨µÄ²Ù×÷ÐèÒª¶¯Ì¬Ö´ÐС£Õâ¾ÍÐèҪʹÓö¯Ì¬SQLÀ´ÊµÏÖ¡£±¾ÎÄͨ¹ý¼¸¸öʵÀýÀ´ÏêϸµÄ½²½â¶¯Ì¬SQLµÄʹÓᣡ¡¡¡
¡¡¡¡±¾ÎÄÊÊÒ˶ÁÕß·¶Î§£ºOracle³ ......
¹ØÓÚPL/SQLÖжԴ洢¹ý³Ìadd debug information
http://space.itpub.net/13129975/viewspace-626245
Èç¹ûʹÓÃPL/SQL DeveloperÖÐÑ¡ÔñÒ»¸ö´æ´¢¹ý³Ìdebugµ«ÓÖdebug²»½øÈ¥£¡
½â¾öÕâ¸öÎÊÌâÊǺܼòµ¥µÄ£¬Ö»ÐèÒªÔÚPL/SQL DeveloperÖÐÑ¡ÔñÒªdebugµÄ´æ´¢¹ý³Ì£¬È»ºóµãÓÒ¼ü£¬ÔÚµ¯³öµÄ²Ëµ¥ÖÐÑ¡Ôñ"Add debug information"ºóÔÙÖ ......
1 µ±Ê¹ÓÃgroup byʱ£¬Î´ÔÚgroup by ²¿·ÖÓõ½µÄ±íÁÐÔÚs e l e c t²¿·Ö³öÏÖʱ±ØÐëʹÓ÷Ö×麯Êý¡£
select last_name, state_cd, sum(sales) from customer group by last_name;
ERROR at line 1:
ORA-00979: not a GROUP BY expression.
state_cdÓ¦¸ÃʹÓ÷Ö×麯Êý£¬m a x ( )¡¢m i n ( )¡¢s u m ( )¡¢c o u n t ( )»òa v g ......
ÏÈ¿´ÏÂÃæµÄÒ»¶Î´úÂ룺
public class UserTest
{
public int age { set; get;
}
¡¡¡¡¡¡¡¡ public string name { set; get; } & ......