SqlDataSource无法正常工作 [英] SqlDataSource not working

查看:107
本文介绍了SqlDataSource无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

select pmtblempreg.Id,pmtblempreg.Name,pmtblempreg.UserName,pmtbldesignation.Designation, pmtblempreg.skypeid,pmtblempreg.EmailId from pmtbldesignation
right join pmtblempreg  on pmtbldesignation.Id=pmtblempreg.DesignationId





这个查询工作正常oracle数据库....但是当使用sqlDataSource执行填充gridview时,错误显示无效的表名



当我通过sqldataSource的查询构建器执行它时查询更改为



This query works fine in oracle database.... But when executing using sqlDataSource for populating a gridview an error is showing that invalid table name

when i execute it through the query builder of sqldataSource the query changes to

SELECT        PMTBLEMPREG.ID, PMTBLEMPREG.NAME, PMTBLEMPREG.USERNAME, PMTBLDESIGNATION.DESIGNATION, PMTBLEMPREG.SKYPEID,
                         PMTBLEMPREG.EMAILID
FROM            { oj PMTBLDESIGNATION RIGHT OUTER JOIN
                         PMTBLEMPREG ON PMTBLDESIGNATION.ID = PMTBLEMPREG.DESIGNATIONID }





oj会自动与表名一起创建....这是问题??



an oj is automatically created along with the table name.... Is that the problem??

推荐答案

使用你有的查询首先发布在DB端执行时工作。

或者从第二个查询中删除oj和Curly Braces并使用它。
Use the Query you have posted first which is working while executing in DB side.
Or remove "oj" and the Curly Braces from the second query and use it.


这篇关于SqlDataSource无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆