异常详细信息:System.Data.SqlClient.SqlException:'。'附近的语法不正确。 [英] Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '.'.

查看:1020
本文介绍了异常详细信息:System.Data.SqlClient.SqlException:'。'附近的语法不正确。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii all ..当我尝试使用存储过程从sql server中标记数据时,我的页面出错。

请提前帮助谢谢。



'。'附近的语法不正确。



描述:在执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.Data.SqlClient.SqlException:'。'附近的语法不正确。



来源错误:





第51行:

第52行:SqlDataAdapter da = new SqlDataAdapter(Cmd);

第53行:da.Fill(dt);

第54行:if(dt.Rows.Count> 0)

第55行:{



源文件:D:\ ANIL \ 20012014更新-17-2 \TrackSystem \TrackWebApplication\ChildInfo.aspx.cs行:53

hii all.. this is error in my page when i try to fatch data in labels from sql server using store procedure..
PLEASE HELP thanks in advance.

Incorrect syntax near '.'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '.'.

Source Error:


Line 51:
Line 52: SqlDataAdapter da=new SqlDataAdapter(Cmd);
Line 53: da.Fill(dt);
Line 54: if (dt.Rows.Count > 0)
Line 55: {

Source File: D:\ANIL\20012014 update-17-2\TrackSystem\TrackWebApplication\ChildInfo.aspx.cs Line: 53

推荐答案

EXECUTE sp_executesql @vQuery 之前,您的查询似乎没有正确编写 print @vQuery ;并在新窗口中运行打印的语句,您将很容易发现问题。
Your query seems to be not formed properly write print @vQuery before EXECUTE sp_executesql @vQuery; and run the printed statement in new window and you will find issue easily.


这篇关于异常详细信息:System.Data.SqlClient.SqlException:'。'附近的语法不正确。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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