Query works in Sql Server Management Studio, but not ColdFusion with MSSQL -
update: strange clue--if change table1 table3, works in cf. figured dropping table clear out. somehow being zombie. how fix?
this iteration of question "query works in sql server management studio, not in...."
this code, copied , pasted, works in ssms, not in coldfusion query. get:
error executing database query.
[macromedia][sqlserver jdbc driver][sqlserver]invalid column name 'studentid'.
sql:
if object_id('tempdb.dbo.##table1') not null drop table ##table1 create table ##table1 ( [recordid] [integer] identity not null, [studentid] [varchar](15) not null, [coursenumber] [varchar](6) not null, [compdatetime] [datetime] not null, [systeminfo] [varchar](250) null, [writetime] [datetime] default getdate() null, primary key clustered ( [studentid], [coursenumber], [compdatetime] ) ); insert ##table1 (studentid, coursenumber, compdatetime, systeminfo, writetime) values ('aaa', '111', getdate(), 'yes', getdate()), ('bbb', '222', getdate(), 'yes', getdate()), ('ccc', '333', getdate(), 'yes', getdate()) select * ##table1; drop table ##table1
edit 1 -- more error info:
full cf error
the error occurred in //hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm: line 54 called //hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm: line 1 called //hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm: line 54 called //hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm: line 1 52 : 53 : 54 : 55 : 56 : if object_id('tempdb.dbo.##table1') not null
full stack trace
at cfrecords2dcollector2ecfm1769031009._factor5(//hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm:54) @ cfrecords2dcollector2ecfm1769031009.runpage(//hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm:1) @ cfrecords2dcollector2ecfm1769031009._factor5(//hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm:54) @ cfrecords2dcollector2ecfm1769031009.runpage(//hanford/data/sitedata/wbt/wbt-dev/recordscollector/records-collector.cfm:1)
java.sql.sqlsyntaxerrorexception: [macromedia][sqlserver jdbc driver][sqlserver]invalid column name 'studentid'. @ macromedia.jdbc.sqlserverbase.dda4.b(unknown source) @ macromedia.jdbc.sqlserverbase.dda4.a(unknown source) @ macromedia.jdbc.sqlserverbase.dda3.b(unknown source) @ macromedia.jdbc.sqlserverbase.dda3.a(unknown source) @ macromedia.jdbc.sqlserver.tds.ddr.v(unknown source) @ macromedia.jdbc.sqlserver.tds.ddr.a(unknown source) @ macromedia.jdbc.sqlserver.tds.ddr.a(unknown source) @ macromedia.jdbc.sqlserver.ddj.l(unknown source) @ macromedia.jdbc.sqlserverbase.ddde.e(unknown source) @ macromedia.jdbc.sqlserverbase.ddde.a(unknown source) @ macromedia.jdbc.sqlserverbase.ddde.v(unknown source) @ macromedia.jdbc.sqlserverbase.ddde.r(unknown source) @ macromedia.jdbc.sqlserverbase.ddde.execute(unknown source) @ coldfusion.server.j2ee.sql.jrunstatement.execute(jrunstatement.java:348) @ coldfusion.sql.executive.executequery(executive.java:1364) @ coldfusion.sql.executive.executequery(executive.java:1127) @ coldfusion.sql.executive.executequery(executive.java:1058) @ coldfusion.sql.sqlimpl.execute(sqlimpl.java:341) @ coldfusion.tagext.sql.querytag.executequery(querytag.java:915) @ coldfusion.tagext.sql.querytag.doendtag(querytag.java:590) @ cfrecords2dcollector2ecfm1769031009._factor5(\hanford\data\sitedata\wbt\wbt-dev\recordscollector\records-collector.cfm:54) @ cfrecords2dcollector2ecfm1769031009.runpage(\hanford\data\sitedata\wbt\wbt-dev\recordscollector\records-collector.cfm:1) @ coldfusion.runtime.cfjsppage.invoke(cfjsppage.java:231) @ coldfusion.tagext.lang.includetag.dostarttag(includetag.java:418) @ coldfusion.filter.cfincludefilter.invoke(cfincludefilter.java:65) @ coldfusion.filter.applicationfilter.invoke(applicationfilter.java:399) @ coldfusion.filter.requestmonitorfilter.invoke(requestmonitorfilter.java:48) @ coldfusion.filter.monitoringfilter.invoke(monitoringfilter.java:40) @ coldfusion.filter.pathfilter.invoke(pathfilter.java:94) @ coldfusion.filter.exceptionfilter.invoke(exceptionfilter.java:70) @ coldfusion.filter.clientscopepersistencefilter.invoke(clientscopepersistencefilter.java:28) @ coldfusion.filter.browserfilter.invoke(browserfilter.java:38) @ coldfusion.filter.nocachefilter.invoke(nocachefilter.java:46) @ coldfusion.filter.globalsfilter.invoke(globalsfilter.java:38) @ coldfusion.filter.datasourcefilter.invoke(datasourcefilter.java:22) @ coldfusion.filter.cachingfilter.invoke(cachingfilter.java:62) @ coldfusion.cfmservlet.service(cfmservlet.java:201) @ coldfusion.bootstrap.bootstrapservlet.service(bootstrapservlet.java:89) @ jrun.servlet.filterchain.dofilter(filterchain.java:86) @ coldfusion.monitor.event.monitoringservletfilter.dofilter(monitoringservletfilter.java:42) @ coldfusion.bootstrap.bootstrapfilter.dofilter(bootstrapfilter.java:46) @ jrun.servlet.filterchain.dofilter(filterchain.java:94) @ jrun.servlet.filterchain.service(filterchain.java:101) @ jrun.servlet.servletinvoker.invoke(servletinvoker.java:106) @ jrun.servlet.jruninvokerchain.invokenext(jruninvokerchain.java:42) @ jrun.servlet.jrunrequestdispatcher.invoke(jrunrequestdispatcher.java:286) @ jrun.servlet.servletengineservice.dispatch(servletengineservice.java:543) @ jrun.servlet.jrpp.jrunproxyservice.invokerunnable(jrunproxyservice.java:203) @ jrunx.scheduler.threadpool$downstreammetrics.invokerunnable(threadpool.java:320) @ jrunx.scheduler.threadpool$threadthrottle.invokerunnable(threadpool.java:428) @ jrunx.scheduler.threadpool$upstreammetrics.invokerunnable(threadpool.java:266) @ jrunx.scheduler.workerthread.run(workerthread.java:66)
Comments
Post a Comment