DetailsView 带有 SQLDataSource,显示两个表
我需要在两个表中的 DetailsView 上显示一些详细信息。
我有表:orders [orderId , userId_relat]
和表: users [userId , userName]
我有下一个 SQLDataSource SELECT 命令:
SelectCommand="SELECT [orderId], [userId_relat],
FROM [orders] WHERE ([userId_relat] = @userId) >
我想显示输出:
订单ID.........用户名
代替:
orderId .... userId_relat
有可能吗?如果是的话...怎么办?
SQLDataSource 控件仅支持一项选择?
I need to display some details on DetailsView from two tables.
I have table: orders [orderId , userId_relat]
and table: users [userId , userName]
i have the next SQLDataSource SELECT command:
SelectCommand="SELECT [orderId], [userId_relat],
FROM [orders] WHERE ([userId_relat] = @userId) >
i want to show the outpot:
orderId .......... userName
Instead of:
orderId .... userId_relat
It is possible? if yes... how?
SQLDataSource control supports one select only ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
用户 SQL 加入...
如果您需要教程,请访问以下链接:
http://w3schools.com/sql /sql_join.asp
http://www.tizag.com/sqlTutorial/sqljoin.php
“授人以鱼,可以喂他一天。授人以鱼,便是授人以渔。”
User SQL join...
If you need tutorials, go to these links:
http://w3schools.com/sql/sql_join.asp
http://www.tizag.com/sqlTutorial/sqljoin.php
“Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.”