Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

TREEVIEW¶ÁÈ¡SQLÊý¾Ý£¿

±í½á¹¹ÈçÏ£º

SELECT cauth_id,cauth_name,igrade,pauth_id,pauth_name from MAIN_TREE01 ORDER BY CAUTH_ID

auth_id auth_name      igrade    pauth_id  pauth_name
ST ²Ö¿â¹ÜÀí  1 NULL   NULL
ST1 ÈÕ³£ÒµÎñ         2 ST   ²Ö¿â¹ÜÀí
ST101 Èë¿âµ¥         3 ST1   ÈÕ³£ÒµÎñ
ST102 ³ö¿âµ¥         3 ST1   ÈÕ³£ÒµÎñ
ST2 µ¥¾ÝÁÐ±í         2 ST   ²Ö¿â¹ÜÀí
ST201 Èë¿âµ¥Áбí 3 ST2   µ¥¾ÝÁбí
ST202 ³ö¿âµ¥Áбí 3 ST2   µ¥¾ÝÁбí
ST3 ±¨±í         2 ST   ²Ö¿â¹ÜÀí
ST301 ÏÖ´æÁ¿         3 ST3   ±¨±í

ÔõÑùµÝ¹éÏÔʾTREEVIEW1?

  Dim myComm As New SqlClient.SqlCommand("SELECT cauth_id,cauth_name,igrade,csupauth_id,csupauth_name from MAIN_TREE01 ORDER BY CAUTH_ID", sqlconnection1)
        Dim dr As SqlClient.SqlDataReader
        dr = myComm.ExecuteReader
        TreeView1.Nodes.Clear()   
        Do While dr.Read
            Dim i As Integer = dr.Item("igrade")
            If i = 1 Then
                TreeView1.Nodes.Add(dr.Item(&


Ïà¹ØÎÊ´ð£º

¹ØÓÚgroup byµÄsqlÓï¾ä£¿

  with adod_dict do
    begin
    close;
    commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......

×Ü»áÅöµ½¹ÖµÄÎÊÌ⣬sqlÎÊÌâ

sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and  xxfwzf <>0 ),Ö´ÐÐËÙ¶ÈÂýµÄÒªËÀ£¬µ«ÊÇÈç¹û°Ñ(xxf>0 and  ......

C#ÈçºÎÅжÏÁ¬½Ósql serverÊý¾Ý¿â³É¹¦£¿

C#ÈçºÎÅжÏÁ¬½Ósql serverÊý¾Ý¿â³É¹¦£¿
try
{
connection.connect()
return true;
}
catch()
{
return false;
}

Â¥Ö÷ºÜ׿±£¬¿ªÁ˼¸ÌùÁË¡£

ÒýÓÃ
try
{
connection.connect( ......

ÇóÒ»¸ösql Óï¾ä

  table1
  Ãû³Æ      Èë¿âÊý
  CT»ú        3   
  CT»ú        5
  X¹â»ú      4 ......

SQL ¶à±í²éѯ²é³öËùÒªµÄÊý¾Ý£¿

ÒÑÖª´ÓB,±íÖÐÕÒ³öID, NAMEÁ½ÏîÓëC±íÏàͬµÄÊý¾Ý£¬ÔÙÒÀ¾ÝB±íÖо­¹ý²éѯ³öÀ´µÄID,CODEÁ½ÏîÊý¾Ý²éѯÓëA±íID,CODEÁ½ÏîÏàͬµÄÊý¾ÝÖжÔÓ¦µÄEMAILÀ´£¬²¢ÁгöÈçÏÂD±íµÄÐÎʽ£¬²»ÖªÎÒÊÇ·ñ±íʾÇå³þ£¿Âé·³°ïÎÒÁÐһϹ«Ê½ºÃÂð£¿Íò· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ