消息 102,级别 15,状态 1,第 2 行 “=”附近有语法错误。是什么错误 [问题点数:20分]

Bbs1
本版专家分:0
结帖率 0%
Bbs5
本版专家分:4553
Blank
黄花 2007年8月 VB大版内专家分月排行榜第二
Blank
蓝花 2007年12月 VB大版内专家分月排行榜第三
Bbs9
本版专家分:55742
版主
Blank
GitHub 绑定GitHub第三方账户获取
Blank
进士 2017年 总版技术专家分年内排行榜第八
Blank
优秀版主 2016年10月优秀大版主
优秀小版主
Blank
银牌 2017年1月 总版技术专家分月排行榜第二
Bbs1
本版专家分:0
Bbs1
本版专家分:0
消息 102级别 15状态 1,第 8 行' ' 附近有语法错误
select a.Name rnFROM Contacts a inner joinrn BuildFinishedEventSubscribers b on rna.id=b.contactId inner join BuildDefinition c rnon b.DefinitionId=c.id inner join Projects d on rnd.id=c.ProjectId WHERE c.DefinitionName='ALLBUILDDEFINITION' rnAND d.name='OpenTest' rnAND b.statusId='2' rnAND rnb.isEnabled='True'
消息 102级别 15状态 1,第 3 行'' 附近有语法错误。怎样改啊
create database 教务管理系统rnON rn rn Name=教务管理系统_data,rn filename='e:\工作室\教务管理系统_data.mdf',rn size=5MB,rn maxsize=21MB,rn filegrowth=1MBrnrnlog onrnrn name=教务管理系统_log,rn filename='e:\工作室\教务管理系统_log.ldf',rn size=5MB,rn maxsize=21MB,rn filegrowth=11MBrn
消息 102级别 15状态 1,第 3 行 'IC' 附近有语法错误
update ICSelbills set FAction='CASE (SELECT FValue FROM t_SystemProfile rnWhere FCategory='IC'rn and FKey='POOrderTaxInPrice') WHEN ='0' rn THEN CAST(u1.FAuxPrice AS FLOAT)*CAST(v1.FExchangeRate AS FLOAT)rn ELSE CAST(u1.FAuxPrice AS FLOAT)*CAST(v1.FExchangeRate AS FLOAT)/((100+(CASE WHEN isnull(tOrder.FCess,0)<>0 rn then tOrder.FCess ELSE t4.FTaxRate END))/100) END'rnwhere FID='A01' and FFieldName='FSCBillInterID' and FDstCtlField='FAUXPrice'rnGOrnrnrn我要更改一个Action的时候提示这个<em>错误</em>,请帮忙看下哈。
消息 102级别 15状态 1,第 5 行 ')' 附近有语法错误
[code=sql]rncreate proc usp_GetAllLogsSelect_Pagesrn@Category int,rn@Visible int,rn@Uname varchar(50),rn@PageSize int,rn@PageIndex intrnASrndeclare @x int,@y intrnset @x=(@PageIndex-1)*@PageSize+1rnset @y=(@PageIndex)*@PageSizernrnexec ('select* from(rn select ROW_NUMBER() over(order by ReleaseTime desc) as Rownum,rn LId,LogName,Abstract,CommentNo,ReadNo,UName,Category,ReleaseTimern from Logsrn where Category='+@Category+' and Visible='+@Visible+' and Uname like '+@Uname+')rn as logrn where Rownum between '+@x+' and ' +@y) rnrn[/code]rn死活都是这个<em>错误</em><em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,第 5 行rn')' 附<em>近有</em><em>语法<em>错误</em></em>。rn没办法了来提问
消息 102级别 15状态 1,第 7 行 ')' 附近有语法错误
/*==============================================================*/rn/* Table: Friend */rn/*==============================================================*/rncreate table Friend (rn Host_ID ID not null,rn Friend_ID ID not null,rn Friend_Catagory smallint not null,rn Remark_Name Online_Name not null,rn constraint PK_FRIEND primary key nonclustered (Host_ID, Friend_ID)rn)rngornrn/*==============================================================*/rn/* Index: Relationship_17_PK */rn/*==============================================================*/rncreate unique clustered index Relationship_17_PK on Friend (rnrn)rngornrn/*==============================================================*/rn/* Index: Relationship_20_FK */rn/*==============================================================*/rncreate index Relationship_20_FK on Friend (rnHost_ID ASCrn)rngornrn/*==============================================================*/rn/* Index: Relationship_21_FK */rn/*==============================================================*/rncreate index Relationship_21_FK on Friend (rnFriend_ID ASCrn)rngornrnalter table Friendrn add constraint "FK_FRIEND_FRIEND->U_USERS" foreign key (Friend_ID)rn references Users (User_ID)rngornrnalter table Friendrn add constraint "FK_FRIEND_FRIEND->U_USERS" foreign key (Host_ID)rn references Users (User_ID)rngornrnrn建好友表的时候出来的问题……rn改了一天都不知道怎么回事……求救啊!!!!!rn
服务器: 消息 170,级别 15状态 1,行 1;第 1 行: '0' 附近有语法错误
在SQL 查询分析器中"select top 0 * from tank"(其中tank表是我从VFP升迁过来的,)出现了上面的<em>错误</em>,所有升迁过来表只要运行此命令都会出现上面的<em>错误</em>.可运行"select * from tank" 又正常.如果是运行的表是其安数据库,不是升迁过来的也正常.不知提何原因.请多指教.谢谢!!!
消息102级别15状态1错误
[code=SQL]select 原料编号 from 出入库单rnunion allrnselect 原料编号 from 出入货单[/code]rn这样写是没问题的,但是rn[code=SQL]select 原料编号rnfromrn(select 原料编号 from 出入库单rnunion allrnselect 原料编号 from 出入货单)[/code]rn就报错,那里的问题呢,也没有中文空格啊rnrn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,第 5 行rn')' 附<em>近有</em><em>语法<em>错误</em></em>。
消息 102级别 15状态 1,第 7 行
Insert into TS rn select * rn from studentrn where sno in rn (select Snorn from scrn           GROUP BY Sno rn having max(grand) 附<em>近有</em><em>语法<em>错误</em></em>。rn
消息 156,级别 15状态 1,第 1 行 关键字 'case' 附近有语法错误
--try:rn declare @sql1 varchar(8000)rn set @sql1=''rn select @sql1=@sql1+'max(case when PicTitle='''+PicTitle+''' then PicUrl else 0 end) as ['+PicTitle+']' from Attachment group by PicTitlern set @sql1='select'+@sql1+' from Attachment group by PicTitle'rn exec(@sql1)
消息 102级别 15状态 1,第 3 行
create proc P_TCC_INF_UseCaseQuery rn as rn begin rn declare @opename varchar(200)rn declare @tablename varchar(200)rn declare @module_displayname varchar(200)rn declare @projectidField varchar(200)rn declare @keyField varchar(100)rn declare @registerdatefield varchar(200)rn declare @registernameField varchar(100)rn declare @statusfield varchar(1000)rn declare @sql varchar(8000)rn declare @sid bigintrn declare @cur cursorrn rn create table #t(rn TOpeName varchar(200),TtableName varchar(200),rn TModule_DisplayName varchar(200),TprojectidField varchar(200),rn TkeyField varchar(100),Tregisterdatefield varchar(200),rn TregisternameField varchar(100),Tstaus varchar(1000)rn )rn rn set @cur = cursorrn forrn select OpeName,tableName,Module_DisplayName,projectidField,keyField,registerdatefield,rn registernameField,statusfield from TCC_V_INF_UseCaseQueryrn rn open @cur rn fetch next from @cur into @OpeName,@tableName,@Module_DisplayName,rn @projectidField,@keyField,@registerdatefield,@registernameField,@statusfield rn while @@FETCH_STATUS=0 rn begin rn set @sql = 'insert into #t (TprojectidField,TkeyField,Tregisterdatefield,TregisternameField,Tstaus) rn select '+@projectidField+','+@keyField+',rn '+@registerdatefield+','+@registernameField+','+@statusfield+' from ' +@tablename+ ' 'rn exec (@sql)rn fetch next from @cur into @OpeName,@tableName,@Module_DisplayName,@projectidField,rn @keyField,@registerdatefield,@registernameField,@statusfieldrn end rn close @cur rn deallocate @cur rn select * from #trn drop table #trn endrn rn哪位大侠神仙指点一下迷津啊,老是保这个错:rn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,第 3 行 ',' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn不胜感激啊!!!!!!!!!!!!!!!!!rn
SQL出错消息 156,级别 15状态 1,第 1 行 关键字 'in' 附近有语法错误
[code=sql]update RecordsMoneys_Add set itemName in rn(select colvalue from public_DataSelect where colname='奖金分类' )[/code]
修改SQL数据库的表提示消息 102级别 15状态 1,第 2 行'(' 附近有语法错误
我将QSCWH这张表修改,让他可以级联删除rn修改代码:rnAlter table QSCWHrn(cwh char(5)not null primary key,rn qsh char(10) not null,rn foreign key(qsh)references QSXX(qsh)rn on delete cascadern on update cascade)rn<em>错误</em>提示:rn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,第 2 行rn'(' 附<em>近有</em><em>语法<em>错误</em></em>。rn请问是哪里的问题
消息 102级别 15状态 1
单纯脚本执行通过,但创建存储过程时提示<em>错误</em>。rn<em>错误</em>提示如下:rn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,过程 tj_tjjb,第 50 行rn'#tmpjb' 附<em>近有</em><em>语法<em>错误</em></em>。rn****************************************rncreate procedure [dbo].[tj_tjjb]rn@tjh varchar(20),rn@bitxb bit,rn@tjfs varchar(50),rn@dtstart varchar(10),rn@dtend varchar(10)rnasrnrn/*rndeclare @tjh varchar(20)rndeclare @bitxb bitrndeclare @tjfs varchar(50)rndeclare @dtstart varchar(10)rndeclare @dtend varchar(10)rn*/rndeclare @sql varchar(8000)rndeclare @tj varchar(100)rnBEGINrn--select @tjfs = 'B'rncreate table #tmpjb(zd varchar(500),xb varchar(20),bs varchar(100),sl int)rn/*是否性别分组rn*/rn--select @tj = ''rnif @bitxb = 1 rn beginrn select @tj = ' a.xb, 'rn endrn/**/rnselect @sql = isnull(@sql + ',' , '') + '[' + bs + ']' from tj_tjfs where name = @tjfs group by bsrnrnif @tjh <> ''rn beginrn insert into #tmpjb (zd,xb,bs,sl)select a.zd,c.xb,d.bs,1 as sl rn from tj_grjb a, tj_lsb b, tjry c,tj_tjfs d rn where b.tjh = @tjh and d.name = @tjfs and a.lsbid = b.id and b.dah = c.dah and (c.nl between d.nlxx and d.nlsx)rn endrnrnelsern beginrn insert into #tmpjb (zd,xb,bs,sl)select a.zd,c.xb,d.bs,1 as sl rn from tj_grjb a, tj_lsb b, tjry c,tj_tjfs d rn where (convert(varchar(10),zjrq,120) between @dtstart and @dtend) and d.name = @tjfs and a.lsbid = b.id and b.dah = c.dah and (c.nl between d.nlxx and d.nlsx)rnrn endrnrnrn exec('select b.zd, '+ @tjh + @sql +' from (select * from #tmpjb) a pivot (count(sl) for bs in (' + @sql + '))b')rnrn drop table #tmpjbrn*********************************************************
服务器: 消息 170,级别 15状态 1,行 117 行: 'CASE WHEN ' 附近有语法错误
EXEC('rn INSERT ' + @Airline +' (rn Departure,rn Destination,rn FeederRoutingID,rn OnlineRoutingID,rn InterlineRoutingID,rn FeederFareID,rn OnlineFareID,rn InterlineFareID,rn ContractID,rn DateFrom,rn DateTo,rn IsRoundTrip,rn Airline)rn SELECT t1.a as Departure,t2.a as Destination,'rn 'CASE WHEN ' + @FeederRoutingID + ' IS NULL THEN NULL ELSE ' '' + @FeederRoutingID + ''' END ,''' + rn @OnlineRoutingID+ ''',' + rn 'CASE WHEN ' + @InterlineRoutingID + 'IS NULL THEN NULL ELSE ' '' + @InterlineRoutingID + ''' END ,''' + rn 'CASE WHEN ' + @FeederFareID + 'IS NULL THEN NULL ELSE ' '' + @FeederFareID + ''' END ,''' + rn @OnlineFareID+ ''',' + rn 'CASE WHEN ' + @InterlineFareID + 'IS NULL THEN NULL ELSE ' '' + @InterlineFareID + ''' END ,''' + rn @ContractID+ ''',''' + rn @DateFrom+ ''',''' + rn @DateTo+ ''',''' + rn @IsRoundTrip+ ''',''' + rn @Airline + ''' FROMrn (rn select airportcode As a from rn (rn select * from zone where zoneNo='''+ @FeederDep + ''')Zrn INNER JOIN ZoneElement ZE ON Z.zoneID=ZE.zoneIDrn INNER JOIN MST_AirPort A ON A.AirPortID=ZE.AirPortID rn ) AS t1rn CROSS JOINrn ( rn select airportcode As a from rn ( rn select * from zone where zoneNo='''+ @Destination + ''')Zrn INNER JOIN ZoneElement ZE ON Z.zoneID=ZE.zoneIDrn INNER JOIN MST_AirPort A ON A.AirPortID=ZE.AirPortID rn ) AS t2rn ')
第 1 行: '1' 附近有语法错误
第 1 行: '1' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '1' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrnrn行 59: rn行 60: rn行 61: DbDataReader dr = dbSys.ExecuteReader(permissions.GetQueryStr(strWhere));rn行 62: if (dr.Read())rn行 63: rn rn程序这样时会出现上面的<em>错误</em>rn string UserGroup = Session["UserGroup"].ToString().Trim();rn string GroupMenu = Session["GroupMenu"].ToString().Trim();rnrn strWhere = "";rn rn rn//===============注意这里rn strWhere += " and rg.GroupCode= '" + UserGroup + "' and rg.MenuCode= '" + GroupMenu + "'";rn rn//===========rn DbDataReader dr = dbSys.ExecuteReader(permissions.GetQueryStr(strWhere));rn if (dr.Read())rn 。。。省略rnrn如果改成rn string UserGroup = Session["UserGroup"].ToString().Trim();rn string GroupMenu = Session["GroupMenu"].ToString().Trim();rnrn strWhere = "";rn //这里直接给值就可以执行rn strWhere += " and rg.GroupCode = '1' and rg.MenuCode = '21'";rnrn rn rnrn DbDataReader dr = dbSys.ExecuteReader(permissions.GetQueryStr(strWhere));rn if (dr.Read())rn 。。。。省略
sql 语句 中 消息 102级别 15状态 1,第 5 行 是什么错误
create Table Studentrn(Sno CHAR(5) NOT NULL PRIMARY KEY(Sno),rn Sname VARCHAR(20),rn Sage SMALLINT CHECK(Sage>=<em>15</em> AND Sage 附<em>近有</em><em>语法<em>错误</em></em>。rnrnrn
为什么一个简单的插入语句这样的错误消息 102级别 15状态 1,第 2 行
INSERT INTO area (id, code, name1, citycode) VALUESrn (1, '110101','东城区', '110100'),rn(2, '110<em>102</em>', '西城区', '110100')rnrn息 <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,第 2 行rn',' 附<em>近有</em><em>语法<em>错误</em></em>。rnrnrn在sql的查询分析器里始终无法正确执行,单条执行没有问题 .
数据库错误消息 102级别 15状态 1,第 2 行
insert into t_guahao (guahaoId,patientId,name,sex,age,kind,subjectName,doctor,operateTime,operator,state)rnvalues(8,3,'白天侠','男',24,'专家','内科','华佗',2011-5-23 10:42:39,'admin',0);rn不到错在哪里了 望指点!
System.Data.SqlClient.SqlException: 第 1 行: ',' 附近有语法错误
“/AJAXEnabledWebSite2”应用程序中的服务器<em>错误</em>。rn--------------------------------------------------------------------------------rnrn第 1 行: ',' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: ',' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[SqlException (0x80131904): 第 1 行: ',' 附<em>近有</em><em>语法<em>错误</em></em>。]rn System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177rn System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68rn System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199rn System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2411rn System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +147rn System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1038rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314rn System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +413rn System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +1<em>15</em>rn System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +392rn System.Web.UI.WebControls.SqlDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +642rn System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +71rn System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex) +928rn System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +1<em>15</em>2rn System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +190rn System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7rn System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11rn System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +170rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:2.0.50727.832; ASP.NET 版本:2.0.50727.832 rn希望大家帮忙说说什么问题:rnrnrnrn代码如下:rnrnrnrnrnrnrn Untitled Pagernrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn感激了 !
System.Data.SqlClient.SqlException: 第 1 行: ' ' 附近有语法错误
SqlDataAdapter sda = new SqlDataAdapter();rnrn SqlConnection con = new SqlConnection();rn con.ConnectionString = " Data Source=.;Initial Catalog=Northwind;User ID=sa;Password=sa";rn con.Open();rn //找到最大员工idrn SqlCommand cmd = new SqlCommand();rn cmd.CommandText = "SELECT MAX(customerid) FROM Customers WHERE len(customerid) <> 5";rn cmd.Connection = con;rn string sMaxno = cmd.ExecuteScalar().ToString();rn //员工id号增加1rn int i_tem = int.Parse(sMaxno) + 1;rn sMaxno = i_tem.ToString();rn rn SqlCommand cmdAdapter = new SqlCommand();rn cmdAdapter.CommandText = "select CustomerID,CompanyName from customers";rn cmdAdapter.Connection = con;rnrn SqlCommand inData = new SqlCommand();rn inData.CommandText = "INSERT Customers(CustomerID,CompanyName)VALUES(@sCstmid,@scmpName)";rn inData.Connection = con;rnrn inData.Parameters.Add("@sCstmid", SqlDbType.NVarChar, 5, "CustomerID");rn inData.Parameters.Add("@scmpName", SqlDbType.NVarChar, 40, "CompanyName");rn sda.SelectCommand = cmdAdapter;rn sda.InsertCommand = inData;rnrn DataSet ds = new DataSet();rnrn [color=#FF0000] sda.Fill(ds, "Customers");[/color] //提示该行<em>错误</em>rnrn DataRow nRow = ds.Tables["Customers"].NewRow();rn nRow["customerid"] = sMaxno.ToString();rn nRow["CompanyName"] = sMaxno.ToString();rnrn sda.Update(ds, "Customers");rnrn请高手指教
第 1 行: '=' 附近有语法错误
SqlConnection con=db.createConnection();rn con.Open();rn SqlCommand cmd=new SqlCommand();rn cmd.Connection=con;rn cmd.CommandText="update vote set votenun=votenun+1 where voteid="+this.id+" and id="+this.rad.SelectedValue.ToString();rn cmd.ExecuteNonQuery();rn con.Close();rnrn连接是用的db.cs类的rn<em>错误</em>提示如题!
System.Data.SqlClient.SqlException: 第 1 行: '(' 附近有语法错误
[img=http://img.my.csdn.net/uploads/201211/05/1352105096_7848.png][/img]rn这个问题怎么解决啊?
第 1 行: 'DescSelect' 附近有语法错误
有请高手帮忙解决啊.在线等rn第 1 行: 'DescSelect' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: 'DescSelect' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrnrn行 28: SqlDataAdapter sdaNews = new SqlDataAdapter(sbNews.ToString(), MyCls.SqlConn);rn行 29: DataSet dsNews = new DataSet();rn行 30: sdaNews.Fill(dsNews);rn行 31: repRootTop.DataSource = dsNews.Tables[0]; //固顶新闻rn行 32: repBigNews.DataSource = dsNews.Tables[1]; //头条新闻rn rnrn源文件: e:\n\3CMarket\news.aspx.cs 行: 30
第 1 行: '=' 附近有语法错误 [asp]
新学asp,求高手帮忙rn关于在某些页面调用它的时候(此语句写在所有代码的第一行),老是报错(第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em> 代码:80040e14)rn但是,我在有些页面中调用,又可以用,说明,本身的conn.asp页面是没有问题的吧,rn
第 1 行: 'us' 附近有语法错误
报错如题 高手们帮我看看 问题到底出在哪里 谢谢了rn StringBuilder strSql = new StringBuilder();rn strSql.Append("SELECT gxxm.*,xm.XiangMuName AS XiangMuName FROM GongXuXiangMu AS gxxm");rn strSql.Append("INNER JOIN XiangMuList AS xm ON gxxm.XiangMuID=xm.XiangMuID");rn strSql.Append("INNER JOIN GongSi AS gs ON gxxm.GongSiID=gs.GongSiID");rn strSql.Append("INNER JOIN aspnet_Users AS us ON gs.UserId=us.UserId");rn strSql.Append("WHERE us.UserName =@UserName AND gxxm.GongXuType=@gxType ORDER BY xm.XiangMuHao");rn rn SqlParameter[] parameters = rn new SqlParameter("@UserName", SqlDbType.NVarChar,256),rn new SqlParameter("@gxType", SqlDbType.Bit)rn ;rn
第 1 行: ',' 附近有语法错误
导入数据库时出错:System.Data.OleDb.OleDbException: 第 1 行: ',' 附<em>近有</em><em>语法<em>错误</em></em>。 在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) 在 System.Data.OleDb.OleDbCommand.ExecuteNonQuery() 在 HRM_Management_EmployeeInfoEnter.Finish_Click(Object sender, EventArgs e) 位置 c:\Documents and Settings\lh\桌面\personnel_net\personnel_HRM\personnelWebUI\HRM_Management\PersonManagement\EmployeeInfoEnter.aspx.cs:行号 353rnrnrnprotected void Finish_Click(object sender, EventArgs e)rn rn string CnnString = "Provider=SQLOLEDB;database=Rs_Sysyem;server=.;uid=sa;pwd=123456";rn string fPath = this.FileUpload2.PostedFile.FileName;//获得要导入的文件名 rn string extName = fPath.Substring(fPath.LastIndexOf(".") + 1);//获得文件的扩展名 rn string mystring = "Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = '" + fPath + "';Extended Properties=Excel 8.0";rn OleDbConnection cnnxls = new OleDbConnection(mystring);rn OleDbDataAdapter myDa = new OleDbDataAdapter("select * from [Sheet$]", cnnxls);rn DataSet myDs = new DataSet();rn myDa.Fill(myDs);rn if (myDs.Tables[0].Rows.Count > 0)rn rn string strSql = "";rn using( OleDbConnection conn = new OleDbConnection(CnnString))rn rn conn.Open();rn OleDbCommand myCmd = null;rn for (int i = 0; i < myDs.Tables[0].Rows.Count; i++)//第一个工作表中行数,不包括第一行,rn rn strSql = "insert into RS_Person(P_NAME,P_NUM,P_IDCARD,P_BirthDay,P_SEX,P_MARRIED,P_NATIONAL,P_PARTY,P_ORIGIN,P_ACCOUNT,P_TEL,P_MOBLIE,P_EMAIL,P_ADDRESS,P_POSTNUM,P_SSNUM,P_BANKNUM,P_QUA,P_SCHOOL,P_PRO,P_COMPUTER,P_LANGUAGE,P_SKILLGRADE,P_ChkSkillDay,P_TITLE,P_JOBSTATUS,P_WORKTYPE,P_JOB,P_DEPARTMENT,P_DoWorkDay,P_WORKAGE,P_WAGE,P_JoinJobDay,P_LeaveJobDay,P_WAGE_GRADE,P_StartDay,P_EndDay,P_FirstDesDay,P_DESNUM) values ( '";rn strSql += myDs.Tables[0].Rows[i].ItemArray[0].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[1].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[2].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[3].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[4].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[5].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[6].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[7].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[8].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[9].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[10].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[11].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[12].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[13].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[14].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[<em>15</em>].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[16].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[17].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[18].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[19].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[20].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[21].ToString().Replace("'", "''") + "',";rn strSql += myDs.Tables[0].Rows[i].ItemArray[22].ToString() + ",";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[23].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[24].ToString().Replace("'", "''") + "',";rn strSql += myDs.Tables[0].Rows[i].ItemArray[25].ToString() + ",";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[26].ToString().Replace("'", "''") + "',";rn strSql += myDs.Tables[0].Rows[i].ItemArray[27].ToString() + ",";rn strSql += myDs.Tables[0].Rows[i].ItemArray[28].ToString() + ",";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[29].ToString().Replace("'", "''") + "',";rn strSql += myDs.Tables[0].Rows[i].ItemArray[30].ToString() + ",";rn strSql += myDs.Tables[0].Rows[i].ItemArray[31].ToString() + ",";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[32].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[33].ToString().Replace("'", "''") + "',";rn strSql += myDs.Tables[0].Rows[i].ItemArray[34].ToString() + ",";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[35].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[36].ToString().Replace("'", "''") + "',";rn strSql += "'" + myDs.Tables[0].Rows[i].ItemArray[37].ToString().Replace("'", "''") + "',";rn strSql += myDs.Tables[0].Rows[i].ItemArray[38].ToString() + ")";rn myCmd = new OleDbCommand(strSql, conn);rn tryrn rn myCmd.ExecuteNonQuery();rn Response.Write(" ");rn rn catch (OleDbException err)rn rn Response.Write("导入数据库时出错:" + err.ToString());rn break;rn rn rn conn.Close();rn rn rn rnrnrn但是Excel 里的数据 已经 读取到数据库 里去了, 为什么 还是那个<em>错误</em> 而且还是 报在 页面上
System.Data.SqlClient.SqlException: 第 1 行: '' 附近有语法错误
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadrnrn If Not IsPostBack Thenrn Dim tbname As String = Session("dtname")rn conn = New SqlConnection("server=localhost;database=cjglxt;uid='sa';pwd='lwqyll1353'")rn sqldap = New SqlDataAdapter("select * from '" + tbname + "'", conn)rn ds = New DataSetrn sqldap.Fill(ds, "dtchengji")rn Session("MyData") = ds.Tables("dtchengji")rn Elsern dtchengji = Session("mydata")rn End Ifrn End Subrnrn运行时提示:System.Data.SqlClient.SqlException: 第 1 行: '' 附<em>近有</em><em>语法<em>错误</em></em>。<em>错误</em>。rnrn另外:我想实现:运行时创建一个datatable ,往里面添加数据。然后点击保存按钮时,把datatable里面的所有数据存在数据库里面。请问我这样做行不行:rn Private Sub Btnext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnext.Click -----往数据表里面添加数据rnrn dtchengji = CType(Session("mydata"), DataTable)rn rows = dtchengji.NewRowrn rows.Item("banji") = ddlnianji.SelectedItem.Value.ToString & "." & ddlbanji.SelectedItem.Value.ToStringrn rows.Item("xuehao") = CLng(Txuehao.Text)rn rows.Item("xingming") = Txingming.Textrn rows.Item("chengji") = CDec(Tchengji.Text)rn dtchengji.Rows.Add(rows)rn dtchengji.AcceptChanges()rnrn Session("mydata") = dtchengjirn Txuehao.Text = CStr(CLng(Txuehao.Text) + 1)rn End SubrnrnPrivate Sub btsave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btsave.Click ------往数据库里面倒的数据rn rn Dim commandstr As New SqlCommandBuilder(sqldap)rn sqldap.insertCommand = commandstr.insertCommandrn sqldap.Update(ds, "dtchengji")rn End Sub
报错:第 1 行: '=' 附近有语法错误
代码:rn Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)rn ' 在新会话启动时运行的代码rn Application.Lock()rn Application("countpeople") = Convert.ToInt32(Application("countpeople")) + 1 rn Application("countonline") = Convert.ToInt32(Application("countonline")) + 1rn Application.UnLock()rn rn rn Dim connstr As Stringrn Dim conns As SqlConnectionrn conns = New SqlConnection("server=localhost;uid=sa;pwd=;database=myweb")rn conns.Open()rn rn Dim sqls As String = "updata count set num=1"rn Dim cmd As SqlCommandrn cmd = New SqlCommand(sqls, conns)rn rn cmd.ExecuteNonQuery()rn rn rn conns.Close()rn rn End Subrnrn看来看去没有问题啊,晕头了
第 1 行: 'form' 附近有语法错误
查了好久,都不懂错在哪,程序提示:rn第 1 行: 'form' 附<em>近有</em><em>语法<em>错误</em></em>。 rn行 31: ad.Fill(ds);rnrnrn代码如下:rnrn SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLConnString1"].ConnectionString);rnrn string strsql = "select top 1 * form ttxtea_img where ImgCategoryId=@Cid and id=@id";rnrn SqlDataAdapter ad = new SqlDataAdapter(strsql, conn);rnrn ad.SelectCommand.Parameters.Add(new SqlParameter("@Cid", SqlDbType.Int, 4));rn ad.SelectCommand.Parameters["@Cid"].Value = Request.QueryString["Cid"];rn ad.SelectCommand.Parameters.Add(new SqlParameter("@id", SqlDbType.Int, 4));rn ad.SelectCommand.Parameters["@id"].Value = Request.QueryString["id"];rnrn DataSet ds = new DataSet();rn ad.Fill(ds);rnrn FormView1.DataSource = ds;rn FormView1.DataBind();rn conn.Close();rn
Sys.WebForms.PageRequestManagerServerErrorException: 第 1 行: ',' 附近有语法错误
for (int g = 0; g < GridViewD.Rows.Count; g++)rn rn fn = "ents_comid, ents_mid,ents_sid, ents_code,ents_pid, ents_qty, ents_wid, ents_price, ents_amount,ents_discount,ents_gamount, ents_oth1, ents_rem";rn fdb = "dbo.Entry_det";rn string strpre = ((CheckBox)GridViewD.Rows[g].FindControl("CheckBoxpre")).Checked.ToString() == "True" ? "1" : "0";rn freq = getuser.Strcomid + ",11,'" + ((TextBox)FormView1.FindControl("entm_idTextBox")).Text.Trim().ToString() + "'," + (g + 1) + ",'" + ((TextBox)GridViewD.Rows[g].FindControl("TextBox1")).Text + "'," + ((TextBox)GridViewD.Rows[g].FindControl("TextBox3")).Text + "," + ((DropDownList)GridViewD.Rows[g].FindControl("DropDownListw")).SelectedValue + "," + ((TextBox)GridViewD.Rows[g].FindControl("TextBox4")).Text + "," + (((Label)GridViewD.Rows[g].FindControl("Label4")).Text) + "," + ((TextBox)GridViewD.Rows[g].FindControl("TextBox6")).Text + "," + ((Label)GridViewD.Rows[g].FindControl("Label8")).Text + ",'"+ ((TextBox)GridViewD.Rows[g].FindControl("TextBox9")).Text + "','" + ((TextBox)GridViewD.Rows[g].FindControl("TextBox11")).Text + "'";rn DB_operation.insert_data(fn, fdb, freq);rn rnrn调试到这的时候提示<em>语法<em>错误</em></em>
System.Data.SqlClient.SqlException: 第 1 行: '(' 附近有语法错误
在本地测试的时候都没有<em>错误</em>,但是发布到服务器上就出现该<em>错误</em>了。为什么呢?
asp.net第 1 行: '=' 附近有语法错误
public DataRow dr;rn public static string newsid; rn protected void Page_Load(object sender, EventArgs e)rn rn newsid = Request.Params["nid"];rn SqlConnection con = DB.con();rn SqlDataAdapter dad4 = new SqlDataAdapter("select * from news where nid="+newsid,con);rn DataSet dst = new DataSet();rn dad4.Fill(dst, "aaa");rn dr = dst.Tables["aaa"].Rows[0];rn rnrn常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrn行 22: SqlDataAdapter dad4 = new SqlDataAdapter("select * from news where nid="+newsid,con);rn行 23: DataSet dst = new DataSet();rn行 24: [color=#FF0000]dad4.Fill(dst, "aaa");[/color]rn行 25: dr = dst.Tables["aaa"].Rows[0];rn行 26: rnrnrnrn问题补充:调试了一下,竟然newsid的值为null,请问出现为空值,一般在什么情况下?rn最好给个详细解决方案..rn
受不了了,第 1 行: '=' 附近有语法错误
<em>错误</em>类型:rnMicrosoft OLE DB Provider for SQL Server (0x80040E14)rn第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rnadmin/zpsave.asp, 第 103 行rnrn这个问题我看了很久了,都不知道解决,代码如下rnrn第一行: rn第<em>102</em>行:rn[code=C#]rn<em>102</em> sub editsoft() '修改rn103 rs.Open "select * from zuopin where zpid=" & Request("id"),conn,1,3rn104 rs("zpname")=zpnamern105 rs.Updatern106 End subrn[/code]rn我就想不通了,同一页面上面的sub newsoft(),call的时候完全正常,如下rn[code=C#]rn88 sub newsoft() '加入rn89 rs.Open "select * from zuopin",conn,1,3rn90 rs.AddNew rn91 rs("zpname")=zpnamern92 rs.Updatern93 End subrn[/code]rnrn请问这个<em>错误</em>到底是怎么回事啊?看了很久,受不了了rnrn另外如果我把sub editsoft() 里的rs换成SQL执行命令,如下:rn103 conn.beginTransrn104 sql= "update zuopin set zpname='"&zpname&"' where pid=" & Request("id")rn105 conn.execute(sql) '"&newsid&"'rn同样是103行出问题,我无语了rnrnrnrn
第 1 行: ',' 附近有语法错误
看这一段SQL代码,无论在程序中还 是 在数据库中的后报题目上的<em>错误</em>,求正解:rn string sqlinstIcstockbillentry = "insert into icstockbillentry (fbrno,finterid,fentryid,fitemid,fqty,fprice,fentryself0<em>15</em>5,fentryself0<em>15</em>5,fentryself0<em>15</em>6,fentryself0<em>15</em>7,fentryself0<em>15</em>8,fentryself0<em>15</em>9,fentryself0160,fentryself0161,fentryself0162,fentryself0163,fentryself0164,fentryself0165,fentryself0166) values (0,'" + int.Parse(tbx_FinterId.Text) + "',1,'" + int.Parse(tbx_itemid.Text) + "','" + Convert.ToDecimal(tbx_netweight.Text) + "' ,'" + Convert.ToDecimal(tbx_netprice.Text) + "','"+tbx_vw.Text+"','"+tbx_wr.Text+"','"+tbx_rr.Text+"','"+tbx_unpr .Text +"','"+tbx_styr .Text +"','"+cbx_cs .Text +"','"+tbx_pzzl.Text +"','"+tbx_mzzl .Text +"','"+tbx_ww .Text+"','"+tbx_rw .Text +"','"+tbx_unpw .Text +"','"+tbx_Class .Text+"' )"
第 1 行: ',' 附近有语法错误。????
private void Button1_Click(object sender, System.EventArgs e)rn rn string strCommand="insert Ex06_04(ID,姓名,性别,年龄,职业) values('"+TextBox1.Text+"','"+TextBox2.Text+"','"+RadioButtonList1.Items.ToString()+"','"+TextBox3.Text+"','"+DropDownList1.Items.ToString()+"')";rn SqlCommand addInfo=new SqlCommand(strCommand,myConnection);rn myConnection.Open();rn addInfo.ExecuteNonQuery();rn myConnection.Close();rn Response.Redirect("WebForm1.aspx");rnrn rnrnrnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: ',' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrn行 69: SqlCommand addInfo=new SqlCommand(strCommand,myConnection);rn行 70: myConnection.Open();rn行 71: addInfo.ExecuteNonQuery(););rn rn
第 1 行: '#' 附近有语法错误
原来这个程序用在ACCESS数据库是没问题的,但是我把这个数据库升级到sql2000后,就出现了问题:rn编译运行后,提示:rn[color=#FF0000]第 1 行: '#' 附<em>近有</em><em>语法<em>错误</em></em>[/color]rn相关代码如下:rn[code=Delphi(Pascal)]beginrn fstr:='SELECT t_saledet.bmh, t_saledet.clabel, t_ware.flh,sum(t_saledet.sl) as esl, sum(t_saledet.sjje) as esjje FROM t_saledet,t_ware'rn +' WHERE t_saledet.clabel=t_ware.clabel and t_saledet.spbh=t_ware.spbh and t_saledet.bmh=''%s'' AND (t_saledet.clabel)=''%s'' AND ([t_saledet.rq])=#%s#'rn +' group by t_saledet.bmh, t_ware.flh, t_saledet.clabel'; rn with aqrytdate dorn beginrn close;rn sql.Clear ;rn sql.Add(Format(fstr,[maskEdit6.text,maskedit5.text,datetostr(DateTimePicker1.Date)]));rn Prepared;rn open;rn end;[/code]rn跟踪后发现可能([t_saledet.rq])=#%s#'这个日期的问题,t_saledet表中rq字段是datetime类型rnaqrytdate的SQL属性是:rnrn[code=SQL]SELECT t_saledet.bmh, t_saledet.clabel, t_ware.flh,sum(t_saledet.sl) as esl, sum(t_saledet.sjje) as esjjernFROM t_saledet,t_warernWHERE t_saledet.clabel=t_ware.clabel and t_saledet.spbh=t_ware.spbh and (((t_saledet.bmh)=:vbmh) AND ((t_saledet.clabel)=:vlabel) AND ((CDate([t_saledet.rq]))=:vrq))rngroup by t_saledet.bmh, t_saledet.clabel,t_ware.flh; [/code]
第 1 行: '124' 附近有语法错误
rn rn rnrnrnrnrnrnrnrnrnrnrn以上是 conn.asprnrnrnrnrnrnrn----------------------------------------------------rnrnrnrnrnrn< 1 thenrn response.write " "rn response.endrn end ifrn rn if cname= "" or len(cname) < 2 thenrn response.write " "rn response.endrn end ifrn if xueshi= "" thenrn response.write " "rn response.endrn end ifrn if didian= "" thenrn response.write " "rn response.endrn end ifrn if cname= "" thenrn response.write " "rn response.endrn end ifrn %>rn rn rnrnrnrnrn以上是 shenbao_do.asprnrnrn技术信息(用于支持人员)rnrn<em>错误</em>类型:rnMicrosoft OLE DB Provider for SQL Server (0x80040E14)rn第 1 行: '124' 附<em>近有</em><em>语法<em>错误</em></em>。rn/xuanke/shenbao_do.asp, 第 43 行
第 1 行: ',' 附近有语法错误
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]第 1 行: ',' 附<em>近有</em><em>语法<em>错误</em></em>。rn
第 1 行: 'a' 附近有语法错误
tryrnrn rn DataSet Tempds = DbClass.getDateSet("Select top 1 a.p_id,a.p_name,a.P_NUM,a.p_idcard,a.p_birthday,a.p_sex," +rn "a.P_MARRIED,a.P_NATIONAL,a.P_PARTY,a.P_ORIGIN,a.P_ACCOUNT,"+rn "a.P_PHOTO,a.P_TEL,a.P_MOBLIE,a.P_EMAIL,a.P_ADDRESS,"+rn "a.P_POSTNUM,a.P_SSNUM,a.P_BANKNUM,a.P_QUA,a.P_SCHOOL,"+rn "a.P_PRO,a.P_COMPUTER,a.P_LANGUAGE,a.P_SKILLGRADE,a.P_ChkSkillDay,"+rn "a.P_TITLE,a.P_JOBSTATUS,a.P_WORKTYPE,a.P_DEPARTMENT,a.P_JOB,a.P_DoWorkDay,a.P_WORKAGE,"+rn "a.P_WAGE,a.P_JoinJobDay,a.P_LeaveJobDay,a.P_WAGE_GRADE,a.P_StartDay,a.P_EndDay,"+rn "a.P_FirstDesDay,a.P_DESNUM"+rn "from RS_Person a,RS_D_INFOMATION b,RS_DUTY c,RS_WageGrade d"+rn "where P_NUM ='" + GvRow.Cells[0].Text + "'");rn DataRowCollection dr = Tempds.Tables[0].Rows;rn if (dr.Count > 0)rn rn P_NAME.Text = dr[0]["P_NAME"].ToString();rn P_NUM.Text = dr[0]["P_NUM"].ToString();rn P_IDCARD.Text = dr[0]["P_IDCARD"].ToString();rn P_BirthDay.Text = dr[0]["P_BirthDay"].ToString();rn P_SEX.Text = dr[0]["P_SEX"].ToString();rn P_MARRIED.Text = dr[0]["P_MARRIED"].ToString();rn P_NATIONAL.Text = dr[0]["P_NATIONAL"].ToString();rn P_PARTY.Text = dr[0]["P_PARTY"].ToString();rn P_ORIGIN.Text = dr[0]["P_ORIGIN"].ToString();rn P_ACCOUNT.Text = dr[0]["P_ACCOUNT"].ToString();rn if (dr[0]["P_PHOTO"].ToString() != "")rn rn Person_Photo.ImageUrl = "../ImgUpload/" + "x_" + dr[0]["P_PHOTO"].ToString();rn Person_Photo.NavigateUrl = "../ImgUpload/" + dr[0]["P_PHOTO"].ToString();rn Person_Photo.Target = "_blank";rn rn P_TEL.Text = dr[0]["P_TEL"].ToString();rn P_MOBLIE.Text = dr[0]["P_MOBLIE"].ToString();rn P_EMAIL.Text = dr[0]["P_EMAIL"].ToString();rn P_ADDRESS.Text = dr[0]["P_ADDRESS"].ToString();rn P_POSTNUM.Text = dr[0]["P_POSTNUM"].ToString();rn P_SSNUM.Text = dr[0]["P_SSNUM"].ToString();rn P_BANKNUM.Text = dr[0]["P_BANKNUM"].ToString();rn P_QUA.Text = dr[0]["P_QUA"].ToString();rn P_SCHOOL.Text = dr[0]["P_SCHOOL"].ToString();rn P_PRO.Text = dr[0]["P_PRO"].ToString();rn P_COMPUTER.Text = dr[0]["P_COMPUTER"].ToString();rn P_LANGUAGE.Text = dr[0]["P_LANGUAGE"].ToString();rn P_SKILLGRADE.Text = PersonClass.ShowSelectText(dr[0]["P_SKILLGRADE"].ToString(), "P_SKILLGRADE");rn P_ChkSkillDay.Text = dr[0]["P_ChkSkillDay"].ToString();rn P_TITLE.Text = dr[0]["P_TITLE"].ToString();rn P_JOBSTATUS.Text = PersonClass.ShowSelectText(dr[0]["P_JOBSTATUS"].ToString(), "P_JOBSTATUS");rn P_WORKTYPE.Text = dr[0]["P_WORKTYPE"].ToString();rn p_DepartName.Text = dr[0]["P_DEPARTMENT"].ToString();rn p_DutyName.Text = dr[0]["P_JOB"].ToString();rn p_WageGradeName.Text = dr[0]["p_WageGradeName"].ToString();rnrn P_DoWorkDay.Text = dr[0]["P_DoWorkDay"].ToString();rn P_WORKAGE.Text = dr[0]["P_WORKAGE"].ToString();rn P_WAGE.Text = dr[0]["P_WAGE"].ToString() + "元";rn P_JoinJobDay.Text = Convert.ToDateTime(dr[0]["P_JoinJobDay"].ToString()).ToShortDateString();rn P_LeaveJobDay.Text = Convert.ToDateTime(dr[0]["P_LeaveJobDay"].ToString()).ToShortDateString();rn p_WageGradeName.Text = dr[0]["P_WAGE_GRADE"].ToString();rn P_StartDay.Text = Convert.ToDateTime(dr[0]["P_StartDay"].ToString()).ToShortDateString();rn P_EndDay.Text = Convert.ToDateTime(dr[0]["P_EndDay"].ToString()).ToShortDateString();rn P_FirstDesDay.Text = dr[0]["P_FirstDesDay"].ToString();rn P_DESNUM.Text = dr[0]["P_DESNUM"].ToString();rn PersonInfo_panel.Visible = true;rn RecordSet_Panel.Visible = false;rn rn elsern rn Tongyong.ShowError(ChkMessage_Panel, ChkMessage_lb, "人员信息不存在");rn rn rn catchrn rn Tongyong.ShowError(ChkMessage_Panel, ChkMessage_lb, "数据加载<em>错误</em>");rn rnrnrn各位大哥帮帮忙啊 rn 问题 :第 1 行: 'a' 附<em>近有</em><em>语法<em>错误</em></em>。 rn我自己想啊 应该是sql 语句的问题 但是 sql 语句放到 查询分析器 里可以 查到数据……rn找了好久 没看出问题的端倪来……rn 哎累死 了,各位大哥 小弟 先谢谢了rn
第 1 行: 'newPureLand' 附近有语法错误
public SqlDataReader GetSubClassForProducts(string ClassName)rn rn SqlConnection myConnection=new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);rn SqlCommand countCmd=new SqlCommand("Select SubClass,(select count(*) from Products where SubClass=newPureLand.SubClass) as nCount from Class where ClassName=@bigClass newPureLand",myConnection);rn rn SqlParameter parameterClassName=new SqlParameter("@bigClass",SqlDbType.VarChar,50);rn parameterClassName.Value=ClassName;rn countCmd.Parameters.Add(parameterClassName);rn rn myConnection.Open();rn SqlDataReader results=countCmd.ExecuteReader(CommandBehavior.CloseConnection);rn return results;rn rnrn<em>错误</em>提示说::第 1 行: 'newPureLand' 附<em>近有</em><em>语法<em>错误</em></em>。rn这是为什么呢?请大家赐教!rn谢先rn
第 1 行: ')' 附近有语法错误
第 1 行: ')' 附<em>近有</em><em>语法<em>错误</em></em>。rnrnSqlConnection conn = BaseClass.DBConn.CyCon();rn conn.Open();rn SqlCommand cmd = new SqlCommand("select count(*) from Film where FilmName='" + textBox2.Text + "'", conn);//查询是否存在当前名字的服务员信息rn int i = Convert.ToInt32(cmd.ExecuteScalar());rn rn cmd = new SqlCommand("insert into Film(FilmID,FilmName,Actor,Director,Publisher,Content,PubDate,Sort) values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox6.Text + "','" + textBox8.Text + "','" + textBox5.Text + "','" + textBox7.Text +[color=#FF0000] "',)", conn);[/color]//如果不存在,进行数据库插入rn cmd.ExecuteNonQuery();rn conn.Close();rn BindData();rnrn button1.Enabled = true;rn button2.Enabled = false;rn button3.Enabled = false;rn button4.Enabled = false;rn button5.Enabled = true;rn button6.Enabled = false;rn button7.Enabled = true;rn textBox1.Enabled = false;rn 好烦啊,都不知道错哪了 是那里问题吗
System.Data.SqlClient.SqlException: 第 1 行: '=' 附近有语法错误
private void btnSubmit_Click(object sender, System.EventArgs e)rn rn string strConn="server=localhost;uid='sa';pwd='111';database=User";rn SqlConnection conn = new SqlConnection(strConn);rn conn.Open();rn string strSql = "insert into UserInof values ('"+txtName.Text+"','"+txtPwd.Text+"','"+txtMail.Text+"')";rn SqlCommand myCommand = new SqlCommand(strConn, conn);rn myCommand.ExecuteNonQuery();rn
第 2 行: 'notnull' 附近有语法错误
Create table bookrn(Bno char(4) notnull unique,rn Bclass char(12) notnull,rn Bchubanshe char(30),rn Bzuozhe char(20),rn Bname char(50) notnull,rn Bmoney money(8),rn Primary key(Bno)rn);rnrn出现:rn服务器: <em>消息</em> 170,<em>级别</em> <em>15</em>,<em>状态</em> 1,行 2rn第 2 行: 'notnull' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn请问<em>是什么</em>问题?
消息 156,级别 15状态 1,第 1 行
一个数据库程序在本地登录 数据 和 服务器数据rnrn本地数据库:rnrnselect name from UFDATA_001_2013..sysobjects where xtype='U' except (select name from UFData_999_2010..sysobjects where xtype='U') rnrnrnrn服务器数据库:rnselect name from UFDATA_001_2013..sysobjects where xtype='U' except (select name from UFData_999_2010..sysobjects where xtype='U') rnrnrn执行 此两条语句时 本地数据库能正常查询到 而 服务器数据库报出rnrn<em>消息</em> <em>15</em>6,<em>级别</em> <em>15</em>,<em>状态</em> 1,第 1 行rn在关键字 'except' 附<em>近有</em><em>语法<em>错误</em></em>。
服务器: 消息 170,级别 15状态 1,过程 CopyGroup,行 28 第 28 行: '@i' 附近有语法错误
Select Top 1 @CategoryId = id from category where id in(Select Top @i id from category) and GroupId=@id order by id desc --28行rnrn---------------------------rn大概简写如下:rnrnSet @i=1rn While @i<=@iCount --category 循环rn BeginrnrnSelect Top 1 @CategoryId = id from category where id in(Select Top @i id from category) and GroupId=@id order by id desc rnSet @i=@i+1rnEndrn-----------------rn我要取表category 第 (@i) 条数据
sql server报消息 156,级别 15状态 1,第 1 行 关键字 'order' 附近有语法错误
当取表名“order”时一直插不进去数据,但当改了表名后,却可以了,暂时不知道为什么。
新建标量函数错误(提示:消息 102级别 15状态 1,过程 ComputeServiceCallTotal,第 10 行
Create FUNCTION dbo.ComputeServiceCallTotalrn(rn@LaborRate money = 0,rn @Hours float = 0,rn @PartsCost money = 0rn )rnRETURNS moneyrnASrnBEGINrn  RETURN ((@LaborRate * @Hours) + @PartsCost)rnEND
存储过程消息 102级别 15状态 1,过程 GetSaleSumByEmp,第 2 行
create procedure GetSaleSumByEmprn@sum(salesum) output,rn@year int,rn@month int,rn@empid nchar(10)rnasrnbeginrnselect @sum=sum(sale.salesum)rnfrom sale,employeernwhere sale.empid=employee.empidrnand year(saledate)=@yearrnand month(saledate)=@monthrngroup by sale.empidrnhaving saleid=@saleidrnendrnrn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,过程 GetSaleSumByEmp,第 2 行rn'(' 附<em>近有</em><em>语法<em>错误</em></em>。rn<em>消息</em> 137,<em>级别</em> <em>15</em>,<em>状态</em> 1,过程 GetSaleSumByEmp,第 8 行rn必须声明标量变量 "@sum"。rnrnrn怎么改啊?帮帮忙吧
][SQLServer]第 1 行: '@P1' 附近有语法错误这样的错误
分页代码时 用sqlserver2000 select top ? * from users where id not in (select top ? * from users); 此时一直出现java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]第 1 行: '@P1' 附<em>近有</em><em>语法<em>错误</em></em>...
服务器: 消息 137,级别 15状态 2,行 1
CREATE PROCEDURE sp_deltree rn(@id int)rnASrndeclare @sql nvarchar(3000)rnprint @idrnset @sql ="delete from pic_tree where id=@id"rnEXECUTE sp_executesql @sqlrnGOrn----------热行后显示rn服务器: <em>消息</em> 137,<em>级别</em> <em>15</em>,<em>状态</em> 2,行 1rn必须声明变量 '@id'。rn为什么呢?
消息 156,级别 15状态 1关键字 'select' 附近有语法错误
CREATE PROCEDURE getshopfenleideseshangpin --访问者选择了某个门类,但没有 选择该门类下的分类,只返回该门类下的特色商品rn(rn @shopfenleiid int,rn @shangpingmiaoshulanght int, --商品描述的长度;rn @pageshu int, --返回页数rn @pageshangpinshu int, --每一页显示的商品rn @shuchu int output --输出参数rn)rnasrndeclare @shangpin table --声明表变量;rn(rn RowNumber int,rn shangpinid int,rn names varchar(50),rn miaoshu varchar(500),rn piace money,rn smallphoto varchar(50),rn photo varchar(50),rn onshouye bit,rn ontesheshangpin bit)rnrnrninsert into @shangpin rn[color=#FF0000]select ROW_NUMBER() OVER (ORDER BY shangpingtable.shangpinid) as row,[/color]rnshangpingid,names,substring(miaoshu,1,@shangpingmiaoshulanght)+'...'as miaoshu,rnpiace,photo,onshouye ,ontesheshangpin fromrn(select DISTINCT shangpingtable.shangpinid,shangpingtable.names,rn substring(miaoshu,1,@shangpingmiaoshulanght)+'...'as miaoshu,rn piace,photo,onshouye ,ontesheshangpinrn from shangpingtable inner join lianjiebiao on shangpintable.shangpinid=lianjiebiao.shangpinid rn inner join xifentable on lianjiebiao.xifenid=xifentable.xifenidrn where shangpingtale.onshuye=1 and xifentable.shopfenleiid=@shopfenleiidrnrn)rnrnselect @shuchu=count(shangpinid) from @shangpinrnrnselect shangpinid,names, miaoshu,piace,smallphoto,photo,onshouye,ontesheshangpinrnfrom @shangpin where RowNumber>(@pageshu-1)* @pageshangpinshu and RowNumber 附<em>近有</em><em>语法<em>错误</em></em>。rnrn
简单问题:为什么出现:“消息 170,级别 15状态 1,过程SP_READ ,第 31 行'max' 附近有语法错误
在一个数据库中解决了text类型字段内容读取的问题,把过程复制到另一个数据库后出现了如题的<em>错误</em>,可是在原来那个数据库该过程是可以成功执行的。rn该<em>错误</em>主要针对的代码是:DECLARE @BookCont varchar(max)这行rnrnDECLARE @BookCont varchar(max)rnDECLARE @ID INTrnDECLARE @Count INT --多少条rnDECLARE @Num INT --第几页 rnrn想不通是为什么?
select 1>0 第 1 行: '>' 附近有语法错误
select 1>0 第 1 行: '>' 附<em>近有</em><em>语法<em>错误</em></em>。 什么原因 rn
异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '1' 附近有语法错误
源<em>错误</em>: rnrnrn行 384: rn行 385: SqlCommand cmd = CreateCommand(sqlStr);rn行 386: object obj = cmd.ExecuteScalar();rn行 387: return obj;rn行 388: rn rnrn源文件: j:\daikuan\daikuan\daikuan\App_Code\SqlData.cs 行: 386 rnrn堆栈跟踪: rnrnrn[SqlException (0x80131904): 第 1 行: '1' 附<em>近有</em><em>语法<em>错误</em></em>。]rn System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890rn System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875rn System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194rn System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392rn System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33rn System.Data.SqlClient.SqlDataReader.get_MetaData() +83rn System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297rn System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32rn System.Data.SqlClient.SqlCommand.ExecuteScalar() +139rn SqlData.GetScalar(String sqlStr) in j:\daikuan\daikuan\daikuan\App_Code\SqlData.cs:386rn daikuan.Complain.DAL.ComplainDAL.GetAllCount(ComplainInfo model) in j:\daikuan\daikuan\daikuan\App_Code\Complain\DAL\ComplainDAL.cs:119rn daikuan.Complain.BLL.ComplainBLL.GetAllCount(ComplainInfo model) in j:\daikuan\daikuan\daikuan\App_Code\Complain\BLL\ComplainBLL.cs:42rn BackGround_ComplainAdmin.GridviewBind() in j:\daikuan\daikuan\daikuan\BackGround\ComplainAdmin.aspx.cs:41rn BackGround_ComplainAdmin.Page_Load(Object sender, EventArgs e) in j:\daikuan\daikuan\daikuan\BackGround\ComplainAdmin.aspx.cs:22rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35rn System.Web.UI.Control.OnLoad(EventArgs e) +99rn System.Web.UI.Control.LoadRecursive() +50rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627rnrn rn哪位大侠帮帮小弟?很急的,帮帮忙,好吗?我的QQ是:897948924
第 1 行: '1' 附近有语法错误。 请高手解决
第 1 行: '1' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '1' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[SqlException (0x80131904): 第 1 行: '1' 附<em>近有</em><em>语法<em>错误</em></em>。]rn System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857370rn System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734982rn System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188rn System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838rn System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31rn System.Data.SqlClient.SqlDataReader.get_MetaData() +62rn System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297rn System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32rn System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122rn System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12rn System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7rn System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141rn System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137rn System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable) +92rn UHDisPage.UhDisPageRepeaterPost.FillData() +210rn UHDisPage.UhDisPageRepeaterPost.OnLoad(EventArgs e) +442rn System.Web.UI.Control.LoadRecursive() +47rn System.Web.UI.Control.LoadRecursive() +131rn System.Web.UI.Control.LoadRecursive() +131rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.210
第 6 行: ')' 附近有语法错误
1: select * from rn2: (rn3: select yw_shangsi, sum(case yw_del when 1 then 1 else 0 end) as num rn4: from yewuyuan rn5: group by yw_shangsi having sum(case yw_del when 1 then 1 else 0 end)>=3rn6: )rnrn服务器: <em>消息</em> 170,<em>级别</em> <em>15</em>,<em>状态</em> 1,行 6rn第 6 行: ')' 附<em>近有</em><em>语法<em>错误</em></em>。rnrnrnrnrnrnrn
消息 102级别 15状态 1,过程 LC_GetProjectInfosByConditions,第 27 行 Incorrect syntax near
ALTER PROCEDURE LC_GetProjectInfosByConditions rn -- Add the parameters for the stored procedure herern @projectID varchar(50),rn @projectName nvarchar(200),rn @departmentName nvarchar(50),rn @catgoryID int, --项目类别rn @unitcategoryID int, --部门类别rn @unit int, --联合申报rn @state int --审核<em>状态</em>rnASrnBEGINrn SELECT a.* rn FROM LC_T_projects a left join rn LC_Department_projects b on a.projectID=b.projectID left join rn LC_Department c on b.Department_ID=c.Department_IDrn WHERE (a.projectID like '%'+@projectID+'%')rn and (a.projectName like '%'+@projectName+'%') rn and (c.DepartmentName like '%'+@departmentName+'%')rn if(@catgoryID!='0')rn and a.categoryID=@catgoryIDrn if(@unitcategoryID!='0')rn and b.unitcategoryid=@unitcategoryID rn if(@unit!='2')rn and a.projectID in(select projectID from LC_Department_projects where departmenttype=@unit) rn if(@state!='0')rn and a.result=@state rnENDrnrnrn执行总是提示:<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,过程 LC_GetProjectInfosByConditions,第 27 行rnIncorrect syntax near 'END'. rn那位高手帮个忙,感激不尽!!
消息 102级别 15状态 1,过程 spProductsTop,第 32 行?????
create procedure spProductsToprn(@top varchar(25),rn @orderby varchar(50),rn @categoryId varchar(25)rnrn)rnasrnset nocount onrn--select top +@top o.* ,s.Name as categoryName ,p.name as vendor from product o rn--inner join categories s on o.categoryId=s.Id inner join customers p on o.vendor=p.idrnrndeclare @ssql varchar(500)rnselect @sSql='select top'+@toprnselect @sSQL=@sSql+'o.*,s.Name as CategoryName,'rnselect @sSQL=@sSql+ 'p.Name as Vendor'rnselect @sSQL=@sSql+ 'from Products o inner join 'rnrnselect @sSQL=@sSql+ 'categories s on o.CategoryId=s.Id inner join 'rnselect @sSQL=@sSql+'Customers p on o.VendorId=p.Id'rnrnif cast(@CategoryId as int)>=0rnbegin rnselect @sSQL=@sSQL +'where o.CategoryID='+@CategoryIdrnend rnif @orderBy <>'DateTimed'rnselect @sSql=@sSql+'Order by o.'+@Orderby +' desc ,o.DateTimed desc &'rnelsernselect @sSql=@sSql+ 'order by o'+@orderby +'desc'rnexec (@sSql)rnrnset nocount off rn******************************rn( @cartId nvarchar(25)) 此句就是<em>错误</em>之处?????rn******************************rnasrnSELECT A.ProductID, A.ModelName, A.ModelNumber, B.Quantity, rn A.UnitCost, CAST(A.UnitCost * B.Quantity AS money) AS ExtendedAmountrnFROM dbo.Products A INNER JOINrn dbo.ShoppingCart B ON A.ProductID = B.ProductIDrnWHERE (B.CartID = @CartID)rnORDER BY A.ModelName, A.ModelNumber rnrnrn<em>错误</em>提示为:rn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,过程 spProductsTop,第 32 行rn'@cartId' 附<em>近有</em><em>语法<em>错误</em></em>。rn<em>消息</em> 137,<em>级别</em> <em>15</em>,<em>状态</em> 2,过程 spProductsTop,第 38 行rn必须声明标量变量 "@CartID"。rnrn
消息 102级别 15状态 1,过程 ProcedureName1,第 53 行?
SET ANSI_NULLS ONrnGOrnSET QUOTED_IDENTIFIER ONrnGOrn-- =============================================rn-- Author: Name1rn-- Create date: rn-- Description: rn-- =============================================rnCREATE PROCEDURE ProcedureName1 rn -- Add the parameters for the stored procedure herern @p1 int = 0rnASrnBEGINrn -- SET NOCOUNT ON added to prevent extra result sets fromrn -- interfering with SELECT statements.rn SET NOCOUNT ON;rnrn -- Insert statements for procedure herern INSERT dbo.tabTimeData( 区站号, 入库时间, 通信方式, 日期时间, 电源<em>状态</em>, 瞬时风速, 瞬时风向, 二分风速, 二分风向, 十分风速, 十分风向, 极大风速, 极大风向, 极大风速对应时间, 最大风速, 最大风向, 最大风速对应时间, 分钟雨量, 一小时雨量, 十分钟最大雨强, 最大雨强出现时间, 空气温度, 最高气温, 最高气温出现时间, 最低气温, 最低气温出现时间, 相对湿度, 最小湿度, 最小湿度出现时间, 本站气压, 最高气压, 最高气压出现时间, 最低气压, 最低气压出现时间) rn select rn cast(区站号 as char(8)), rn cast(插入时间 as datetime), rn 'G', rn cast(观测时间 as datetime), rn cast(电池电压 as char(8)), rn cast(瞬时风速 as int), rn cast(瞬时风向 as int), rn cast(二分钟平均风速 as int), rn cast(二分钟平均风向 as int), rn cast(十分钟平均风速 as int), rn cast(十分钟平均风向 as int), rn cast(极大风速 as int), rn cast(极大风速的风向 as int), rn cast(极大风速出现时间 as char(10)), rn cast(最大风速 as int), rn cast(最大风速的风向 as int), rn cast(最大风速出现时间 as char(10)), rn cast(小时每分钟雨量 as char(120)), rn cast(小时雨量 as int), rn NULL, rn NULL, rn cast(气温 as int), rn cast(最高气温 as int), rn cast(最高气温出现时间 as char(10)), rn cast(最低气温 as int), rn cast(最低气温出现时间 as char(10)), rn cast(相对湿度 as int), rn cast(最小相对湿度 as int), rn cast(最小相对湿度出现时间 as char(10)), rn cast(本站气压 as int), rn cast(最高本站气压 as int), rn cast(最高本站气压出现时间 as char(10)), rn cast(最低本站气压 as int), rn cast(最低本站气压出现时间 as char(10))rn from openrowset('SQLOLEDB','FXQXJ';'sa';'sa',Meso_2008.dbo.JLHour_2008) rn          where datediff(hh , dt , getdate()) = 0 order by dt descrnENDrnGOrn------------------------rn<em>消息</em> <em>102</em>,<em>级别</em> <em>15</em>,<em>状态</em> 1,过程 ProcedureName1,第 53 行rn' ' 附<em>近有</em><em>语法<em>错误</em></em>。rn
消息 4104,级别 16,状态 1,第 2 行
use Northwindrngornrn select dbo.Customers.CustomerIDrn from dbo.Customersrn where dbo.Orders.CustomerID=dbo.Customers.CustomerIDrngornrnrnrn<em>消息</em> 4104,<em>级别</em> 16,<em>状态</em> 1,第 2 行rn无法绑定由多个部分组成的标识符 "dbo.Orders.CustomerID"。rnrn请问这是怎么回事?谢谢rnrnrnrnrn
第 1 行: '=' 附近有语法错误。哪出错了?
第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrnrn行 110: rn行 111: PrepareCommand(cmd, connection, null, cmdType, cmdText, parameters);rn行 112: new SqlDataAdapter(cmd).Fill(dataTable);rn行 113: connection.Close();rn行 114: rn rn看了很久都不知道哪里出错了??
添加数据时,出现 “第 1 行: ')' 附近有语法错误
如题:我的代码是:rnstring str = "Insert into userinfos(hyjb,username,password,wenti,daan,sp_name,qyname,qytype,qytyp1,scname,addess,linkren,tel,email,qq,http,chuanzhen,post,jianjie,zhuyin)values('"+yjhyjb+"','"+yjusername +"','"+yjpass+"','"+yjwenti+"','"+yjdaan+"','"+yjspname+"','"+yjqyname+"','"+yjsc+"','"+yjhy+"','"+yjscname+"','"+yjaddess+"','"+yjlinkren+"','"+yjtel+"','"+yjemail+"','"+yjqq+"','"+yjhttp+"','"+yjchuanzhen+"','"+yjpost+"','"+yjcontent+"','"+yjzhuying+"',)";rn access.DoSql(str);  //access类rnaccess:rnrnpublic static void DoSql(string sql)//执行添加、删除、更新时使用rn rn SqlConnection conn1 = new SqlConnection(ConfigurationManager.ConnectionStrings["GirlsysConnectionString"].ConnectionString);rn conn1.Open();rn SqlCommand cmd = new SqlCommand(sql, conn1);rn cmd.ExecuteNonQuery();rn conn1.Close();//关闭数据库rn rn点击添加后,出现题目上出现的<em>错误</em>
急!System.Data.SqlClient.SqlException: 第 1 行: 'System' 附近有语法错误
我在用C#编一个还原数据库(sql2000)的程序出现<em>错误</em>:rn[color=#FF0000]有关调用实时(JIT)调试而不是此对话框的详细信息,rn请参见此<em>消息</em>的结尾。rnrn************** 异常文本 **************rnSystem.Data.SqlClient.SqlException: 第 1 行: 'System' 附<em>近有</em><em>语法<em>错误</em></em>。rn 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)rn 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)rn 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)rn 在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)rn 在 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)rn 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)rn 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()rn 在 人事管理系统.LinkDataBase.RestoreDataBase() 位置 C:\Documents and Settings\Administrator\桌面\课程设计\人事管理系统\LinkDataBase.cs:行号 108rn 在 人事管理系统.Mainfrm.数据还原ToolStripMenuItem_Click(Object sender, EventArgs e) 位置 C:\Documents and Settings\Administrator\桌面\课程设计\人事管理系统\Mainfrm.cs:行号 179rn 在 System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)rn 在 System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)rn 在 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)rn 在 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)rn 在 System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)rn 在 System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)rn 在 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)rn 在 System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)rn 在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)rn 在 System.Windows.Forms.Control.WndProc(Message& m)rn 在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)rn 在 System.Windows.Forms.ToolStrip.WndProc(Message& m)rn 在 System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)rn 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)rn 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)rn 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)rnrnrn************** 已加载的程序集 **************rnmscorlibrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dllrn----------------------------------------rn人事管理系统rn 程序集版本: 1.0.0.0rn Win32 版本: 1.0.0.0rn 基本代码: file:///C:/Documents%20and%20Settings/Administrator/桌面/课程设计/人事管理系统/bin/Debug/人事管理系统.exern----------------------------------------rnSystem.Windows.Formsrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dllrn----------------------------------------rnSystemrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dllrn----------------------------------------rnSystem.Drawingrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dllrn----------------------------------------rnSystem.Datarn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dllrn----------------------------------------rnSystem.Xmlrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dllrn----------------------------------------rnSystem.Configurationrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dllrn----------------------------------------rnSystem.Transactionsrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dllrn----------------------------------------rnSystem.EnterpriseServicesrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dllrn----------------------------------------rnmscorlib.resourcesrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dllrn----------------------------------------rnSystem.Windows.Forms.resourcesrn 程序集版本: 2.0.0.0rn Win32 版本: 2.0.50727.42 (RTM.050727-4200)rn 基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dllrn----------------------------------------rnrn************** JIT 调试 **************rn要启用实时(JIT)调试,rn该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置rnjitDebugging 值。rn编译应用程序时还必须启用rn调试。rnrn例如: rnrnrn rnrnrn启用 JIT 调试后,任何无法处理的异常rn都将被发送到在此计算机上注册的 JIT 调试器,rn而不是由此对话框处理。[/color]rnrn
向高手朋友求救:第 1 行: '(' 附近有语法错误
异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。 rnrn源<em>错误</em>: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[SqlException (0x80131904): 第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。] rn System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466 rn System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118 rn System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186 rn System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932 rn System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31 rn System.Data.SqlClient.SqlDataReader.get_MetaData() +62 rn System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297 rn System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005 rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32 rn System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122 rn System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12 rn System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7 rn System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141 rn System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 rn System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 rn System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 rn System.Web.UI.WebControls.BaseDataList.GetData() +57 rn System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +284 rn System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +56 rn System.Web.UI.WebControls.BaseDataList.DataBind() +52 rn System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +76 rn System.Web.UI.WebControls.BaseDataList.CreateChildControls() +63 rn System.Web.UI.Control.EnsureChildControls() +87 rn System.Web.UI.Control.PreRenderRecursiveInternal() +50 rn System.Web.UI.Control.PreRenderRecursiveInternal() +170 rn System.Web.UI.Control.PreRenderRecursiveInternal() +170 rn System.Web.UI.Control.PreRenderRecursiveInternal() +170 rn System.Web.UI.Control.PreRenderRecursiveInternal() +170 rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 rnrn希望朋友们能详细的解答一下
java.sql.SQLException: 第 1 行: 't_update' 附近有语法错误
500 Servlet Exceptionrnjava.sql.SQLException: 第 1 行: 't_update' 附<em>近有</em><em>语法<em>错误</em></em>。rn at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)rn at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)rn at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)rn at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)rn at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:418)rn at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1258)rn at com.p6spy.engine.logging.P6LogStatement.executeQuery(P6LogStatement.java:200)rn at com.caucho.sql.UserStatement.executeQuery(UserStatement.java:132)rn at com.keling.db.Link._query(Link.java:898)rn at com.keling.db.Link.query(Link.java:284)rn at com.keling.db.Link.returnObjects(Link.java:523)rn at com.keling.db.Link.returnObject(Link.java:546)rn at com.keling.db.Link.returnNumber(Link.java:563)rn at com.keling.db.Link.returnNumber(Link.java:639)rn at com.keling.db.Link.returnInt(Link.java:655)rn at com.keling.db.ext.PageSelector.getTotal(PageSelector.java:120)rn at com.keling.db.ext.PageSelector.getPages(PageSelector.java:94)rn at com.keling.db.ext.PageResult.getPages(PageResult.java:38)rn at com.keling.sp.ctrl.Pagi.classic(Pagi.java:69)rn at com.keling.sp.ctrl.Pagi.classic(Pagi.java:130)rn at _jsp._req._viewed_0me__jsp._jspService(REQ/viewed_me.jsp:147)rn at com.caucho.jsp.JavaPage.service(JavaPage.java:61)rn at com.caucho.jsp.Page.pageservice(Page.java:578)rn at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:192)rn at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)rn at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:241)rn at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:435)rn at com.caucho.server.port.TcpConnection.run(TcpConnection.java:586)rn at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:690)rn at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:612)rn at java.lang.Thread.run(Thread.java:619)rnrn怎么办啊?一点都不懂
调用存储过程时出错::第 1 行: '-' 附近有语法错误
public int Count()rn rn SqlConnection con=DAL.Conn.CreateCon();rn con.Open();rn SqlCommand cmd=new SqlCommand("sp_page",con);rn cmd.CommandType=CommandType.StoredProcedure;rn cmd.Parameters.Add("@tb","article");rn cmd.Parameters.Add("@col","id");rn cmd.Parameters.Add("@coltype",SqlDbType.Int);rn cmd.Parameters["@coltype"].Value=0;rn cmd.Parameters.Add("@orderby",SqlDbType.Int);rn cmd.Parameters["@orderby"].Value=0;rn cmd.Parameters.Add("@collist","*");rn cmd.Parameters.Add("@pagesize",SqlDbType.Int);rn cmd.Parameters["@pagesize"].Value=10;rn cmd.Parameters.Add("@page",SqlDbType.Int);rn cmd.Parameters["@page"].Value=0;rn cmd.Parameters.Add("@condition","");rnrn cmd.Parameters.Add("@pages",SqlDbType.Int);rn cmd.Parameters["@pages"].Direction=ParameterDirection.Output;rn cmd.ExecuteNonQuery();rn int s=(int)cmd.Parameters["@pages"].Value;rn con.Close();rn return s;rn rnrn整个数据库里的过程是:rnrnCREATE PROCEDURE sp_pagern @tb varchar(50), --表名rn @col varchar(50), --按该列来进行分页rn @coltype int, --@col列的类型,0-数字类型,1-字符类型,2-日期时间类型rn @orderby bit, --排序,0-顺序,1-倒序rn @collist varchar(800),--要查询出的字段列表,*表示全部字段rn @pagesize int, --每页记录数rn @page int, --指定页rn @condition varchar(800),--查询条件rn @pages int OUTPUT --总页数rnASrn/*rn功能描述:对指定表中满足条件的记录按指定列进行分页查询,分页可以顺序、倒序rn 查询可以指定页大小、指定查询任意页、指定输出字段列表,返回总页数rn作 者:pbsqlrn版 本:1.10rn最后修改:2004-11-29rn*/rnDECLARE @sql nvarchar(4000),@where1 varchar(800),@where2 varchar(800)rnIF @condition is null or rtrim(@condition)=''rnBEGIN--没有查询条件rn SET @where1=' WHERE 'rn SET @where2=' 'rnENDrnELSErnBEGIN--有查询条件rn SET @where1=' WHERE ('+@condition+') AND '--本来有条件再加上此条件rn SET @where2=' WHERE ('+@condition+') '--原本没有条件而加上此条件rnENDrnSET @sql='SELECT @pages=CEILING((COUNT(*)+0.0)/'+CAST(@pagesize AS varchar)+rn ') FROM '+@tb+@where2rnEXEC sp_executesql @sql,N'@pages int OUTPUT',@pages OUTPUT--计算总页数rnIF @orderby=0rn SET @sql='SELECT TOP '+CAST(@pagesize AS varchar)+' '+@collist+rn ' FROM '+@tb+@where1+@col+'>(SELECT MAX('+@col+') '+rn ' FROM (SELECT TOP '+CAST(@pagesize*(@page-1) AS varchar)+' '+rn @col+' FROM '+@tb+@where2+'ORDER BY '+@col+') t) ORDER BY '+@colrnELSErn SET @sql='SELECT TOP '+CAST(@pagesize AS varchar)+' '+@collist+rn ' FROM '+@tb+@where1+@col+' ENDrnEXEC(@sql)rnrnGOrnrnrn
用SQLHelper.cs 出现第 1 行: '(' 附近有语法错误。,请教!
以下方法调用了Sqlhelper.ExecuteNonQuery方法,在Sqlhelper的ExecuteNonQuery方法提示“1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。”,下面Sqlhelper的ExecuteNonQuery方法<em>错误</em>处有提示请看,谢谢!rnrnpublic void AddCategory(string Uname, string Upwd, string Uemail, char Utype)rn rn SqlParameter[] parms = new SqlParameter[]rn new SqlParameter(SQL_PARM_Uname,SqlDbType.NVarChar),rn new SqlParameter(SQL_PARM_Upwd, SqlDbType.NChar),rn new SqlParameter(SQL_PARM_Uemail,SqlDbType.NVarChar),rn new SqlParameter(SQL_PARM_Utype,SqlDbType.Char)rn ;rn parms[0].Value = Uname;rn parms[1].Value = Upwd;rn parms[2].Value = Uemail;rn parms[3].Value = Utype;rnrn string sql = "INSERT INTO ('Uname','Upwd','Uemail','Utype') VALUES (SQL_PARM_Uname,SQL_PARM_Upwd,SQL_PARM_Uemail,SQL_PARM_Utype)";rn SqlHelper.ExecuteNonQuery(SqlHelper.connectionString, CommandType.Text, sql, parms);rn rnrnrn//以下是Sqlhelper的ExecuteNonQuery定义rnrn /// rn ///执行一个不需要返回值的SqlCommand命令,通过指定专用的连接字符串。rn /// 使用参数数组形式提供参数列表 rn /// rn /// rn /// 使用示例:rn /// int result = ExecuteNonQuery(connString, CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24));rn /// rn /// 一个有效的数据库连接字符串rn /// SqlCommand命令类型 (存储过程, T-SQL语句, 等等。)rn /// 存储过程的名字或者 T-SQL 语句rn /// 以数组形式提供SqlCommand命令中用到的参数列表rn /// 返回一个数值表示此SqlCommand命令执行后影响的行数rn public static int ExecuteNonQuery(string connectionString, CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)rn rnrn SqlCommand cmd = new SqlCommand();rnrn using (SqlConnection conn = new SqlConnection(connectionString))rn rn //通过PrePareCommand方法将参数逐个加入到SqlCommand的参数集合中rn PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);rn int val = cmd.ExecuteNonQuery(); //该行提示出错:1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn //清空SqlCommand中的参数列表rn cmd.Parameters.Clear();rn return val;rn rn
求救,异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '=' 附近有语法错误
这是我的代码:rn求救,第1行有<em>错误</em>!!! rn这是我的代码 rnprotected void Page_Load(object sender, System.EventArgs e) rn rn SqlConnection ST_myConn = new SqlConnection(); rn string ST_dns = ConfigurationSettings.AppSettings["strConn"]; rn ST_myConn.ConnectionString = ST_dns; rnrn string ST_sql = "select * from B_news where B_id=" + Request.QueryString["id"] + ""; rnrn SqlDataAdapter ST_myCmd = new SqlDataAdapter(ST_sql, ST_myConn); rnrn DataSet ST_ds = new DataSet(); rn ST_myCmd.Fill(ST_ds, "NewsCheck"); rn NewsShow.DataSource = ST_ds.Tables[0].DefaultView; rn NewsShow.DataBind(); rn rnrnrn执行的时候提示异常详细信息: 异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。 rnrn源<em>错误</em>: rnrnrn行 38: rn行 39: DataSet ST_ds = new DataSet(); rn行 40: ST_myCmd.Fill(ST_ds, "NewsCheck"); rn行 41: NewsShow.DataSource = ST_ds.Tables[0].DefaultView; rn行 42: NewsShow.DataBind(); rnrn请问这是怎么回事啊?????
异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: 'Admin' 附近有语法错误
我刚遇到了一个问题,请高手帮忙解决。具体问题情况如下:rnrn“/Exercise”应用程序中的服务器<em>错误</em>。rn--------------------------------------------------------------------------------rnrn第 1 行: 'Admin' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: 'Admin' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrnrn行 26: rn行 27: conn.Open();rn行 28: sdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);rn行 29: rn行 30: catch (SqlException ex)rn rnrn源文件: e:\n\Exercise\UserLoginUC.ascx.cs 行: 28
500 Servlet Exception java.sql.SQLException: 第 1 行: ' 附近有语法错误
java.sql.SQLException: 第 1 行: ' 附<em>近有</em><em>语法<em>错误</em></em>。rn at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)rn at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)rn at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)rn at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)rn at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:933)rn at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorCreate(MSCursorResultSet.java:541)rn at net.sourceforge.jtds.jdbc.MSCursorResultSet.(MSCursorResultSet.java:<em>15</em>4)rn at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:365)rn at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1258)rn at edu.nwpu.grsadmin.information.News_Edit.FileShow(News_Edit.java:110)rn at _news._viewnews__jsp._jspService(/gyy/news/viewnews.jsp:24)rn at com.caucho.jsp.JavaPage.service(JavaPage.java:75)rn at com.caucho.jsp.Page.subservice(Page.java:506)rn at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)rn at com.caucho.server.http.Invocation.service(Invocation.java:3<em>15</em>)rn at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)rn at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)rn at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)rn at com.caucho.server.TcpConnection.run(TcpConnection.java:139)rn at java.lang.Thread.run(Thread.java:534)rnrnrn--------------------------------------------------------------------------------rnResin 2.1.17 (built Tue Jul 11 09:01:03 PDT 2006) rnrn查阅了很多资料,仍然不会解决,希望大家帮帮我。谢谢!!!
第 1 行: '=' 附近有语法错误?急ing
rnrnrnrnrnrnrn rn rn rn 删除确认rn rnrn rn rn rn rn rn rn 你真的要删除 rn rn 这个学生吗?rn 取消rn rn rn rn rn rnrnrnrnrn rn第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rn源<em>错误</em>: rn行 77: objcmd=new sqlcommand(sql,myconn)rn行 78: myconn.open()rn行 79: objcmd.executenonquery()rn行 80: myconn.close()rn行 81: 'response.Redirect("xsdel.aspx")rn源文件: E:\dbsbx\zjcgl\xsdel.aspx 行: 79 rnrn请问这是怎么回事呀!我怎么看我的sql语法也没问题呀!rnrn
异常详细信息: SqlException: 第 1 行: '(' 附近有语法错误
第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn[code=C#]异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrnrn行 43: SqlDataAdapter dr = new SqlDataAdapter(sql, conn);rn行 44: DataSet ds = new DataSet();rn行 45: dr.Fill(ds);rn行 46: conn.Close();rn行 47: dl.DataSource = ds;[/code]rn rn快疯了,都没有<em>错误</em>啊?rnrnhttp://hi5234.7057.yes165.com/rnrn帮我看看啊
模糊查询的时候提示 '第 1 行: ' + edit1.text + ' 附近有语法错误。'。
我用一个adoquery连接到数据库里面的一个表rn然后用一个edit作为输入,在edit的onchange里面写模糊查询的代码,但老是提示有<em>错误</em>rn请帮我看一下是为什么rn 代码:rn//////////////////////////////////////////////////////////////////////////////////////rnprocedure TForm1.Edit1Change(Sender: TObject);rnbeginrn ADOQuery1.Close;rn ADOQuery1.SQL.Clear;rn ADOQuery1.SQL.Add('Select * from table1 where name like' + '%' + '''' + edit1.text + '''' + '%');rn ADOQuery1.Open;rn DbGrid1.Refresh;rnend;
第 2 行: 'e:\temp\tmpxscj.bak' 附近有语法错误
use masterrnbackup database XSCJ to 'e:\temp\tmpxscj.bak'rn此语句提示:rn服务器: <em>消息</em> 170,<em>级别</em> <em>15</em>,<em>状态</em> 1,行 2rn第 2 行: 'e:\temp\tmpxscj.bak' 附<em>近有</em><em>语法<em>错误</em></em>。rn<em>错误</em>信息!请高手指教如何修改。
操作失败,错误提示: 第 1 行: 'constraint' 附近有语法错误
以下是前面的一段代码,还请好心人帮忙回答下rnrnalter table C_Purchase alter column price floatrnrndeclare @name varchar(1000) rndeclare @tablename varchar(1000) rndeclare @fieldname varchar(1000) rnset @tablename='C_Supply'rnset @fieldname='price'rnselect @name=b.name from syscolumns a,sysobjects b rnwhere a.id=object_id(@tablename) and b.id=a.cdefault and a.name=@fieldname and b.name like 'DF%' rnexec('alter table C_Supply drop constraint '+@name) rnrn
第 1 行: '=' 附近有语法错误。在线等!!!!
if (dataSet11.Tables["book"].Rows[0]["在库数"].ToString() == "0")rn rn MessageBox.Show("此书已借完!", "书讯提示");rn textBoxBookNo.Text = "";rn textBoxBookNo.Focus();rn dataSet11.Clear();rn myCommand.CommandText = "select * from borrow where" + "读者编号='" + textBoxReaderNo.Text + "'";rn sqlDataAdapter1.SelectCommand = myCommand;rn sqlConnection1.Open();rn sqlDataAdapter1.Fill(dataSet11, "borrow");rn sqlConnection1.Close();rnrn<em>错误</em>提示:第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rn看过其他的貌似都说select语句<em>错误</em>,但是没看出来,谢谢大家了
分页存储过程,报错:第 1 行: 'O' 附近有语法错误
[code=SQL]rnCREATE PROCEDURE [dbo].[usp_PagingLarge]rn@TableNames VARCHAR(2000), --表名,可以是多个表,但不能用别名rn@PrimaryKey VARCHAR(500), --主键,可以为空,但@Order为空时该值不能为空rn@Fields VARCHAR(2000), --要取出的字段,可以是多个表的字段,可以为空,为空表示select *rn@PageSize INT, --每页记录数rn@CurrentPage INT, --当前页,0表示第1页rn@Filter VARCHAR(2000) = '', --条件,可以为空,不用填 wherern@Group VARCHAR(1000) = '', --分组依据,可以为空,不用填 group byrn@Order VARCHAR(1000) = '', --排序,可以为空,为空默认按主键升序排列,不用填 order byrnrn@RecordCount int output --记录总数rnrnrnASrnBEGINrn DECLARE @SortColumn VARCHAR(200)rn DECLARE @Operator CHAR(2)rn DECLARE @SortTable VARCHAR(200)rn DECLARE @SortName VARCHAR(200)rn --DECLARE @SortColumnBegin VARCHAR(200)rn IF @Fields = ''rn SET @Fields = '*'rn IF @Filter = ''rn SET @Filter = 'WHERE 1=1'rn ELSErn --当过滤条件不为空时,只要直接拼接 and ... 就可以了rn SET @Filter = 'WHERE 1=1 ' + @Filterrn IF @Group <>''rn SET @Group = 'GROUP BY ' + @Grouprnrn IF @Order <> ''rn BEGINrn DECLARE @pos1 INT, @pos2 INTrn SET @Order = REPLACE(REPLACE(@Order, ' asc', ' ASC'), ' desc', ' DESC')rn IF CHARINDEX(' DESC', @Order) > 0rn IF CHARINDEX(' ASC', @Order) > 0rn BEGINrn IF CHARINDEX(' DESC', @Order) < CHARINDEX(' ASC', @Order)rn SET @Operator = '='rn ENDrn ELSErn SET @Operator = '='rn SET @SortColumn = REPLACE(REPLACE(REPLACE(@Order, ' ASC', ''), ' DESC', ''), ' ', '')rn SET @pos1 = CHARINDEX(',', @SortColumn)rn IF @pos1 > 0rn SET @SortColumn = SUBSTRING(@SortColumn, 1, @pos1-1)rn SET @pos2 = CHARINDEX('.', @SortColumn)rn IF @pos2 > 0rn BEGINrn SET @SortTable = SUBSTRING(@SortColumn, 1, @pos2-1)rn IF @pos1 > 0 rn SET @SortName = SUBSTRING(@SortColumn, @pos2+1, @pos1-@pos2-1)rn ELSErn SET @SortName = SUBSTRING(@SortColumn, @pos2+1, LEN(@SortColumn)-@pos2)rn ENDrn ELSErn BEGINrn SET @SortTable = @TableNamesrn SET @SortName = @SortColumnrn ENDrn ENDrn ELSErn BEGINrn SET @SortColumn = @PrimaryKeyrn SET @SortTable = @TableNamesrn SET @SortName = @SortColumnrn SET @Order = @SortColumnrn SET @Operator = '>='rn ENDrnrn DECLARE @type varchar(50)rn DECLARE @prec intrn SELECT @type=t.name, @prec=c.precrn FROM sysobjects o rn JOIN syscolumns c on o.id=c.idrn JOIN systypes t on c.xusertype=t.xusertypern WHERE o.name = @SortTable AND c.name = @SortNamern IF CHARINDEX('char', @type) > 0rn SET @type = @type + '(' + CAST(@prec AS varchar) + ')'rnrn DECLARE @TopRows INTrn SET @TopRows = @PageSize * @CurrentPage + 1rn print @TopRowsrn print @Operatorrn EXEC('rn DECLARE @SortColumnBegin ' + @type + 'rn SET ROWCOUNT ' + @TopRows + 'rn SELECT @SortColumnBegin=' + @SortColumn + ' FROM ' + @TableNames + ' ' + @Filter + ' ' + @Group + ' ORDER BY ' + @Order + 'rn SET ROWCOUNT ' + @PageSize + 'rn SELECT ' + @Fields + ' FROM ' + @TableNames + ' ' + @Filter + ' AND ' + @SortColumn + '' + @Operator + '@SortColumnBegin ' + @Group + ' ORDER BY ' + @Order + ' rn ')rnrn--查询记录总数rn IF(@RecordCount is null or @RecordCount=rnrnEmployeeID EmployeeName DeptName ClassName DutyName rn---------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- rn0001 犀利哥 配电部门 男子班 班组级rnrnrnrn[color=#FF0000]服务器: <em>消息</em> 170,<em>级别</em> <em>15</em>,<em>状态</em> 1,行 1rn[Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: 'O' 附<em>近有</em><em>语法<em>错误</em></em>。[/color]rnrn@RETURN_VALUE = N/Arnrn[/code]rnrn谁能帮我看看吗?rn
][SQL Server]第 1 行: '=' 附近有语法错误
][SQL Server]第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rn/showvote.asp, 第 6 行rnrn原代码rnrnrnrnrnrnrn rn rn rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn " cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">rn rn rn rn rn rn rn ?¡À(%) rn rn rn rn rn 12¨®D¨ª??¡À¨¨?¡ä?rn rn rn rnrn rn
SqlException (0x80131904): 第 1 行: '(' 附近有语法错误
第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[SqlException (0x80131904): 第 1 行: '(' 附<em>近有</em><em>语法<em>错误</em></em>。]rn System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857386rn System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734998rn System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188rn System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838rn System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31rn System.Data.SqlClient.SqlDataReader.get_MetaData() +62rn System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297rn System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132rn System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32rn System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122rn System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12rn System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7rn System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141rn System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137rn System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83rn System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770rn System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17rn System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149rn System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70rn System.Web.UI.WebControls.GridView.DataBind() +4rn System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82rn System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69rn System.Web.UI.Control.EnsureChildControls() +87rn System.Web.UI.Control.PreRenderRecursiveInternal() +41rn System.Web.UI.Control.PreRenderRecursiveInternal() +161rn System.Web.UI.Control.PreRenderRecursiveInternal() +161rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360rnrn rn本机可以运行 放到服务器 某个页面报错 求解决
SOS![存储过程]出现了:第 1 行: '@P2' 附近有语法错误
存储过程为:rncreate procedure sp_CommInfo_Add rn @Title nvarchar( 255 ),rn @DevelopDateTime nvarchar( 50 )rn asrn Insert into CommInfo (Title,DevelopDateTime)rn values (@Title, @DevelopDateTime )rnrn rn 其中的代码为:rn CallableStatement cstmt = conn.prepareCall( " call sp_CommInfo_Add( ? ? ) " );rn cstmt.setString(1," Title");rn cstmt.setString(2, "mydate");rn cstmt.execute();rn两个全部是输入参数!rn执行时报错!rndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]第 1 行: '@P2' 附<em>近有</em><em>语法<em>错误</em></em>。rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)rnrn......rn我改为一个参数是,程序通过如:rncreate procedure sp_CommInfo_Add rn @Title nvarchar( 255 )rn asrn Insert into CommInfo (Title)rn values (@Title)rnrn rn 其中的代码为:rnCallableStatement cstmt = conn.prepareCall( " call sp_CommInfo_Add( ? ? ) " );rn cstmt.setString(1," Title");rn cstmt.execute();rn在线!!!!!!!!!!!!!!!rnrn
第 1 行: '-' 附近有语法错误-----怎么解决?
一运行到这总弹出<em>错误</em>[第 1 行: '-' 附<em>近有</em><em>语法<em>错误</em></em>],clientDataSet是DataGrid的数据源,listname是数据库中的表名,大家帮我看看是那里错了!rnrnpublic void SendList(DataSet clientDataSet,string listname)rn rn OleDbConnection listConn=new OleDbConnection("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=list;Data Source=(local);Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=SHAKA;Use Encryption for Data=False;Tag with column collation when possible=False");rn rn listConn.Open();rn rn OleDbCommand createlist=new OleDbCommand("CREATE TABLE "+listname+" (ID INT NOT NULL UNIQUE,NAME CHAR(20) NOT NULL,SIZE CHAR(20) NOT NULL,UNIT CHAR(5) NOT NULL,NUMBER INT NOT NULL,REQUEST CHAR(20) NOT NULL,DESCRIPTION CHAR(20) )",listConn);rn rn createlist.ExecuteNonQuery(); rnrn OleDbDataAdapter listDA=new OleDbDataAdapter("SELECT ID,NAME,SIZE,UNIT,NUMBER,REQUEST,DESCRIPTION FROM "+listname,listConn);rn rn //INSERTrn listDA.InsertCommand=new OleDbCommand("INSERT INTO "+listname+"(ID,NAME,SIZE,UNIT,NUMBER,REQUEST,DESCRIPTION) VALUES(@id,@name,@size,@unit,@number,@request,@description",listConn);rn OleDbParameter para=listDA.InsertCommand.Parameters.Add("@id",OleDbType.Integer);rn para.SourceColumn="ID"; rn para=listDA.InsertCommand.Parameters.Add("@name",OleDbType.Char);rn para.SourceColumn="NAME"; rn para=listDA.InsertCommand.Parameters.Add("@size",OleDbType.Char);rn para.SourceColumn="SIZE"; rn para=listDA.InsertCommand.Parameters.Add("@unit",OleDbType.Char);rn para.SourceColumn="UNIT"; rn para=listDA.InsertCommand.Parameters.Add("@number",OleDbType.Integer);rn para.SourceColumn="NUMBER"; rn para=listDA.InsertCommand.Parameters.Add("@request",OleDbType.Char);rn para.SourceColumn="REQUEST"; rn para=listDA.InsertCommand.Parameters.Add("@description",OleDbType.Char);rn para.SourceColumn="DESCRIPTION"; rnrn DataSet listDS=new DataSet();rn rn listDA.Fill(listDS,listname);rnrn listDS=clientDataSet.Copy(); rn rn //Update DataBasern listDA.Update(listDS,listname); rn
第 1 行: '=' 附近有语法错误,在线急等!!!
代码如下,总是出现如下<em>错误</em>提示,请高手指点rn<em>错误</em>类型:rnMicrosoft OLE DB Provider for SQL Server (0x80040E14)rn第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rn/function/viewpro.asp, 第 5 行rn
异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '-' 附近有语法错误
异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '-' 附<em>近有</em><em>语法<em>错误</em></em>。rn这个第1行指的是哪里?rn以下是我的代码,帮忙看一下rnrnrnrn rnrn rn 加入会员rn rn rn 。。。。。。。。。。。。。。。rn rn rn rn rn rn rn rn rn rn
第 1 行: '=' 附近有语法错误。求大家
http://localhost/456/NetIdle.aspx?dir=E:\sourcecode\456\Upload\123rn用ASP.NET开发的网络硬盘创建新目录的时候的URL 这样的URL是不是很不安全?rnrnrn---------------------------------------------------------------------------------rn 此段代码的意思是将售楼信息从数据库提出,然后点"详细介绍"(现在是用字段ID代替)察看全部信息,现在的问题是提取信息没问题,但是点详细介绍时就会产生这个<em>错误</em>,rnrn“/xx”应用程序中的服务器<em>错误</em>。rn--------------------------------------------------------------------------------rnrn第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: '=' 附<em>近有</em><em>语法<em>错误</em></em>。rnrn源<em>错误</em>: rnrnrn行 36: cn.Open()rn行 37: rn行 38:--------Dim dr As SqlDataReader = cmd1.ExecuteReader()rnrnrnrnrnrn Employeesrn rnrn rnrnrn Employeesrn rnrn rnrnCurrent path: rnrnrn rnrn rn EmployeeIDrn 1rn rnrnrnrn rn rnrn rnrnrnrnrnrn Northwind's Employeesrnrnrnrn rn rnrnrnrn rnrnrnrnrn rnrn rn rnrn rn rnrnrnrnrn rnrnrnrn
System.Data.SqlClient.SqlException: 第 1 行: '12' 附近有语法错误
出现这个<em>错误</em>咋办?rn好像是连接代码上的<em>错误</em>,但应该不会吧,唉。。头都大了
作新闻显示的页面,第 1 行: '=' 附近有语法错误
这是我的链接数据库的源代码 rn
第 1 行: 'Times' 附近有语法错误。 (FreeTextBox 1.6.3 中文版)
第 1 行: 'Times' 附<em>近有</em><em>语法<em>错误</em></em>。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该<em>错误</em>以及代码中导致<em>错误</em>的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 第 1 行: 'Times' 附<em>近有</em><em>语法<em>错误</em></em>。 rnrn各位大佬,怎么解决呀?救救小弟我呀。
ORACLE 10G入门与实践下载
ORACLE.10G入门与实践 ORACLE.10G入门与实践 相关下载链接:[url=//download.csdn.net/download/mao_zh/8274855?utm_source=bbsseo]//download.csdn.net/download/mao_zh/8274855?utm_source=bbsseo[/url]
金山词霸(牛津版)2010激活方法下载
金山词霸(牛津版)2010激活方法 能够享受正版同样的服务 30多本字典 可以正常更新 相关下载链接:[url=//download.csdn.net/download/xuhang01/4650332?utm_source=bbsseo]//download.csdn.net/download/xuhang01/4650332?utm_source=bbsseo[/url]
H3C 可视化面板设计器 用户手册-3.20-6PW101-整本手册下载
H3C 可视化面板设计器 用户手册-3.20-6PW101-整本手册 相关下载链接:[url=//download.csdn.net/download/lsq20062006/5115956?utm_source=bbsseo]//download.csdn.net/download/lsq20062006/5115956?utm_source=bbsseo[/url]
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法
我们是很有底线的