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

¶ÁÈ¡SQL±íÉú³ÉTREEVIEW

Public Function GetDataTable()
Dim myComm As New SqlClient.SqlCommand("SELECT cauth_id,cauth_name,igrade,csupauth_id,csupauth_name from MAIN_TREE01 ", sqlconnection1)
Dim sdapt As New SqlClient.SqlDataAdapter(myComm)
Dim ds As New DataSet
sdapt.Fill(ds)
Return ds.Tables(0)
End Function
Private Sub GetTreeViewDataBound(ByVal nodes As TreeNodeCollection, ByVal csupauth_id As String, ByVal dt As DataTable)
Dim dr As DataRow
If (dt.Rows.Count > 0) Then
Dim node As TreeNode
Dim drs As DataRow() = dt.Select("csupauth_id='" + csupauth_id + "'")
For Each dr In drs
node = New TreeNode()
node.Text = dr(1).ToString()
node.Name = dr(0).ToString
nodes.Add(node)
GetTreeViewDataBound(node.Nodes, node.Name.Trim(), dt)
Next
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TreeView1.Nodes.Clear()
GetTreeViewDataBound(TreeView1.Nodes, "A", GetDataTable())
TreeView1.ExpandAll()
End Sub


Ïà¹ØÎĵµ£º

Æô¶¯PL/SQL Developer ±¨×Ö·û±àÂë²»Ò»Ö´íÎó

´íÎóÈçÏ£º
Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different.
Character set conversion may cause unexpected results.
Note: you can set the client character set through the NLS_LANG environment variable or the NLS_LANG registry key in
HKEY_LOCAL_MACHINE\SOFTWARE\ ......

ÓÃÓÚ·ÖÒ³ÏÔʾµÄSQLÎÄ

Ô­Ö· http://technet.microsoft.com/ja-jp/library/cc411406.aspx
 
¿´ÁËһƪSQL2005¹ØÓÚTransact-SQLµÄÇ¿»¯¼¼ÄܵĽéÉÜ£¬¾õµÃºÜÓÐÓô¦£¬¼òµ¥×ܽáÁËһϡ£
 
£¨Ò»£©Êý¾Ý¿â×ö³É
USE tempdb – »òÕßн¨Ò»¸öDB
CREATE TABLE SpeakerStats
(
  speaker      &n ......

sqlÖнØÈ¡ºÍËã³ö×Ö·û´®µÄ³¤¶È

et ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER function [dbo].[Get_StrArrayLength]
(
 @str varchar(1024),  --Òª·Ö¸îµÄ×Ö·û´®
 @split varchar(10)  --·Ö¸ô·ûºÅ
)
returns int
as
begin
 declare @location int
 declare @start int
 declare @length int
&nbs ......

ͨ¹ýSQLÓï¾äÀ´±¸·Ý,»¹Ô­Êý¾Ý¿â

 1: /*
2: ͨ¹ýSQL Óï¾ä±¸·ÝÊý¾Ý¿â
3: */
4: BACKUP DATABASE mydb
5: TO DISK ='C:\DBBACK\mydb.BAK'
6: --ÕâÀïÖ¸¶¨ÐèÒª±¸·ÝÊý¾Ý¿âµÄ·¾¶ºÍÎļþÃû,×¢Òâ:·¾¶µÄÎļþ¼ÐÊDZØÐëÒѾ­´´½¨µÄ.ÎļþÃû¿ÉÒÔʹÓÃÈÕÆÚÀ´±êʾ
7: 
8: /*
9: ͨ¹ýSQLÓï¾ä»¹Ô­Êý¾Ý¿â
10: */
11: USE ma ......

Sql ²éѯ¼¼ÇÉ ÓÅÏÈÊä³öij½á¹û

SELECT EMP_ID,EMP_NO,LOGIN_NAME,EMP_NAME,SITE_CODE,DEPT_CODE,
JOB_DESC,HRMS_DEPT_CODE,MAIL_ACCOUNT,EXT_NO ,
(case when SITE_CODE='QCS' then 1 else 2 end) site
from dbo.AM_EMPLOYEE
WHERE ACTIVE = 'Y' AND EXT_NO = '6006'
order by site
ÏëÒªÔÚÔ±¹¤±íÖвé³öµç»°ºÅΪ6006µÄÔ±¹¤µÄÓ¢ÎÄÃûÀ´×÷ΪϵͳҳÃæÉ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ