Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No one know Datagridview vertical fields?
Message
 
 
To
03/06/2011 05:45:44
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01512516
Message ID:
01512698
Views:
40
>Thank you Naomi Nosonovsky for reply me. I use ms sql server 2005 , i already read the PIVOT command .
>But i don't konw how can i use. Or i think my case can't use this command to do, May you teacher and give some idea, thank you .
>
>
>
>My database struture (select funcid,add,update,delete,print,generate from AccessRight)
> "0001" "1' "1' "1" "0" "0" all data store string
>
>I want to output datagridview interface
>
>Module Right    Grant
>----------              ---------- 
>add                        "1"        ( will change this data to check box)
>update                 " 1"    
>delete                   "1"
>print                       "0"
>generate              "0"
I see, I misunderstood your original structure. In your case you need UNPIVOT, e.g.
select * from AccessRights UNPIVOT ([Grant] FOR [Module Right] IN ([Add],[Update],[Delete],[Print],[Generate])) unpvt
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform