Compiler Error in achacks.as assmebly code
Simply declaring a variable to a specific compiled c-library class yeilds the following error:
[Compiler] Error #1084: Syntax error: expecting identifier before modulus.
1852.achacks.as, Ln 33031, Col 16:
xor %esi, %esi
The swc produced is unusable.
Does anyone know anything more about this error?
Thanks,
Bo
Your library uses x86 assembly. Probably the assembly is only included when you declare that variable because it is indirectly referenced by the constructor of the class you are trying to declare. When you don't reference the class, the code for it is not linked.
Alchemy, despite telling code that it is i386, cannot link or run x86 assembly. You should find the assembly in your library and somehow remove or disable it. XIXs came up with a nice set of CFLAGS to identify all assembly in unfamiliar code.
Similar Messages
-
I am getting compilation error on following peice of code:
template <typename KEY>
class XYZ
private:
map<KEY,int> m_Map;
typedef map<KEY,int>::iterator it;
}Error: No parameters provided for template.
I have CC version Sun C++ 5.5Following code is compiled successfully. I added 'typename' keyword. Without this keyword compiler shows warning but produces correct code. Have you installed the latest patch for your compiler?
% cat test.cc
#include <map>
using namespace std;
template <typename KEY>
class XYZ
private:
map<KEY,int> m_Map;
typedef typename map<KEY,int>::iterator it;
XYZ<int> s;
% CC -V -c test.cc
CC: Sun C++ 5.5 Patch 113817-19 2006/10/13
ccfe: Sun C++ 5.5 Patch 113817-19 2006/10/13 -
Help- Components Throwing Compile Errors
Thank you for reading my issue. I am using Flash CS3.
Recently, all my projects began throwing compile errors for
standard component AS3 code.
UI Component, FLVPlayback.
I have uninstalled and reinstalled Flash CS3, but to no
avail. Problem persists
I keep getting errors involving "QNAN", which I think
involves trapping for a non-numeric value, or something.
As a test, I created a new Flash doc, placed an instance of
FLVPlayback on the stage, pointed it to a .FLV file in the same
directory.
Errors on compile:
1093: Syntax error.
1084: Syntax error: expecting rightparen before QNAN.
1093: Syntax error.
1084: Syntax error: expecting rightparen before QNAN.
And so on, I get 5 sets of the same errors for different
functions.
The first offending function above reads:
function queueCmd(param1:VideoPlayerState, param2:Number,
param3:Number = 1.#QNAN) : void
if (param1.cmdQueue == null)
param1.cmdQueue = new Array();
}// end if
param1.cmdQueue.push(new QueuedCommand(param2, null, false,
param3));
return;
}// end function
I get similar errors from my UI component AS3 as well.
I have not touched the shipped AS3 for these components. What
gives?
Any ideas?
Thanks
TimThanks, by the way to everyone who has offered thoughts so
far.
xchanin - I've encountered issues with the FLVPlayback
component as well as various of the UI components.
I tried some example applications (from the web) not too long
ago and this issue popped up shortly there after.
But, I'm having issues with even a simple Flash with a single
FLVPlayback instance and one .flv.
There is nothing in the class path for my test file and the
root .as files open from the Flash install when I click the compile
errors in the output window.
So, it really looks like I somehow corrupted those files. I
read a post somewhere that someone had "strange invisible
characters" show up in their .as that were throwing errors.
I thought a clean install would do the trick.
I may completely isolate the example files I was using and
try another reinstall... that's about all I can think of at the
moment.
This has been a couple week search for a solution. I have a
real project coming up an need to solve this.
Thanks for any input! (I assume I can't call Adobe for an
assist as I'm still on CS3 ;)
Tim -
I am using AJAX for search functionality in our appication which involves ADF JSF,jspx pages in JDeveloper 10.1.3.3.0. When I compile the following code it compiles fine without error in jdk1.5 but gives compilation error in jdk1.4.2_15.
public List<String> autoCompleteFindUniqueNames(String searchString){
UniqueEmployeeNamesImpl hits = this.getUniqueEmployeeNames1();
hits.setNamedWhereClauseParam("searchPrefix",searchString.toUpperCase()+ "%");
hits.setRangeSize(5);
hits.executeQuery();
ArrayList resultset = new ArrayList((int)hits.getEstimatedRowCount());
for (Row row:hits.getAllRowsInRange()){
resultset.add((String)row.getAttribute("LastName"));
return resultset;
Compilation error giving on the line " for (Row row:hits.getAllRowsInRange()){ "
and it says " Error ; Expected "
Can somebody helpme out what should I change on this line in order to compile this ?
Thanks in advance,
RamFrank,
Thanks for your response. I removed <String> after LIST and it compiles. But the problem
is with the following iterator code which is giving error while compiling in jdk1.4.2_15. Trying to find out the equivalent iterator code of the following which is in jdk1.5
Row row:hits.getAllRowsInRange()
Thanks,
Ram -
Compilation error for code in Solaris 8 which was compiled in SUNOS 4.1.3
Hi,
I compiled the C source files in Solaris 8 which was earlier compiled in SUNOS 4.1.3(Solaris 1.1).
On compiling I get following discrepencies: 1. Executable size are considerably different.
2. I am using some X windoes system library, it gives compilation error like "prototype mismatch 2 arguments passed when 3 required". "improper member use: fd " fd is the member od display structure.
3. "identifier redeclared: shmat current : function() returning pointer to char
previous: function(int, pointer to const void, int) returning pointer to void : "/usr/include/sys/shm.h""
4. Also I am getting "cg error :..: Disk quota exceeded " while compiling one of the modules.
Please let me know solution of all/any of these.
Thanks in advance!!
Edited by: SmithaIVR on Dec 3, 2008 2:20 AMSounds like ancient code that no longer matches current API's.
Theres not much option except to rewrite those bits. -
Compilation error, When moving code from 32-bit to 64-bit
Hello,
This Code compile on 32 bit system, but Getting Compilation error fro 64 bit,
:/export/home/pshirode/rel_v95/cc_lib > make
Making dependencies...
cc -g -D__EXTENSIONS__ -D_SVID_GETTOD -I../h -I/app/oracle/product/9.2_32/precomp/public -I. `getconf LFS_CFLAGS | head -1` -D UT_TRACE_FUNCTION -I. -m64 -xarch=sparcvis -library=iostream,no%Cstd -H -w -E 2>&1 >/dev/null Bitmap.cc BitmapData.cc BitmapInputTxnStream.cc BitmapOutputStream.cc UnexpectedException.cc FieldData.cc FieldDataCollection.cc FieldDefinition.cc FieldDefinitionCollection.cc OutputFixedStream.cc ParsingEngine.cc Schema.cc Statistics.cc String.cc TraceStream.cc TxnStream.cc c_api.cc SocketImpl.cc Socket.cc ServerSocket.cc UnixSocket.cc Thread.cc test.cc | grep -v License | grep -v command | ../dvl.bin/mkdep >.depends
Dependencies updated...
CC -g -D__EXTENSIONS__ -D_SVID_GETTOD -I../h -I/app/oracle/product/9.2_32/precomp/public -I. `getconf LFS_CFLAGS | head -1` -D UT_TRACE_FUNCTION -I. -m64 -xarch=sparcvis -library=iostream,no%Cstd -c Bitmap.cc
"RuntimeException.h", line 131: Error: Function RuntimeException::~RuntimeException() can throw only the exceptions thrown by the function std::exception::~exception() it overrides.
"RuntimeException.h", line 97: Error: Could not find std::exception::exception(const char*) to initialize base class.
"RuntimeException.h", line 121: Error: xmsg is not a member of std::exception.
"Bitmap.cc", line 62: Error: Cannot return int(Bitmap::*)()const from a function that should return int.
4 Error(s) detected.
make: *** [Bitmap.o] Error 4
CFLAGS in Makefile
# The system include directory must be specifically included first because some of the
# ghost includes use system include file names (e.g., generic.h)
# Modified these section to compile on TVLAPP1HAG
CFLAGS += -D $(STDOUT_TRACE)
#CFLAGS += -g -D$(MAINLINE) $(OUR_COLLECTION)
#CFLAGS += -compat -Qoption ccfe -abirel=4.1
#CFLAGS += -Qoption ccfe -abirel=4.1
CFLAGS += -I. -m64 -xarch=sparcvis -library=iostream,no%Cstd
#CFLAGS += -I. -mt
# Add the flag for multi-threaded apps
LDFLAGS += -lsocket -lnsl -lthread
# declare an empty macro for compiler directive flags, to be command-line
# driven (ie, for -D directives)
CCFLAGS=
CCFLAGS += -DRW_NO_CPP_RECURSION
# The following manipulation of CC and overriding the .cc.o suffix
# dependency is removed here to use what is supplied by default int
# the h/common.mak file.
#XX = CC
#CC = CC
#COMPILE = $(CC) -o $*.o $(CFLAGS) $(CCFLAGS) -c $*.cc
#.cc.o:
# $(COMPILE)
#.DEFAULT:
# $(COMPILE)
#all: $(TEST_OBJS) $(PGM_EXEC)
all: $(TEST_OBJS)
#install:
# $(INSTALL) $(PGM_EXEC)
$(TEMPLATE_CONTAINER).o: $(TEMPLATE_CONTAINER).cc
$(CC) -o $*.o $(CFLAGS) -pta -c $*.cc
# Uncomment the following lines, and uncomment the appropriate MAINLINE
# setting to create your desired test program for a cc_lib routine. Normally
# we simply want to create the cc_lib .o files so this is commented out.
#test exec
$(PGM_EXEC): $(INCLUDES) $(TEST_OBJS)
@echo Linking test...
$(CC) -g -o $(PGM_EXEC) $(TEST_OBJS) $(LDFLAGS) $(ROOT)/util/libutil.a
checksum:
/export/home/pshirode/rel_v95/cc_lib > CC -V
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
Please help ASAPThis looks like exactly the same question you asked in the thread
[http://forums.sun.com/thread.jspa?threadID=5335510]
Please do not ask the same question in more than one thread. -
Compilation error, When moving from 32-bit to 64-bit code
Hello,
I m getting Compilation error, This program already compiled on 32 bit, but getting compilation error on 64 bit.
CC -V
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
make
Making dependencies...
cc -g -D__EXTENSIONS__ -D_SVID_GETTOD -I../h -I/app/oracle/product/9.2_32/precomp/public -I. -xcg92 `getconf LFS_CFLAGS | head -1` -D UT_TRACE_FUNCTION -Dbool=int -g -D -I. -m64 -xarch=sparcvis -H -w -E 2>&1 >/dev/null Bitmap.cc BitmapData.cc BitmapInputTxnStream.cc BitmapOutputStream.cc UnexpectedException.cc FieldData.cc FieldDataCollection.cc FieldDefinition.cc FieldDefinitionCollection.cc OutputFixedStream.cc ParsingEngine.cc Schema.cc Statistics.cc String.cc TraceStream.cc TxnStream.cc c_api.cc SocketImpl.cc Socket.cc ServerSocket.cc UnixSocket.cc Thread.cc test.cc | grep -v License | grep -v command | ../dvl.bin/mkdep >.depends
Dependencies updated...
CC -g -D__EXTENSIONS__ -D_SVID_GETTOD -I../h -I/app/oracle/product/9.2_32/precomp/public -I. -xcg92 `getconf LFS_CFLAGS | head -1` -D UT_TRACE_FUNCTION -Dbool=int -g -D -I. -m64 -xarch=sparcvis -c Bitmap.cc
"/opt/SUNWspro/prod/include/CC/Cstd/./limits", line 1046: Error: Multiple declaration for std::numeric_limits<int>.
"/opt/SUNWspro/prod/include/CC/Cstd/./ostream", line 192: Error: Multiple declaration for std::ostream::operator<<(int).
"/opt/SUNWspro/prod/include/CC/Cstd/./ostream", line 351: Where: While specializing "std::ostream ".
"/opt/SUNWspro/prod/include/CC/Cstd/./ostream", line 351: Where: Specialized in non-template code.
"/opt/SUNWspro/prod/include/CC/Cstd/./ostream", line 192: Error: Multiple declaration for std::wostream::operator<<(int).
"/opt/SUNWspro/prod/include/CC/Cstd/./ostream", line 354: Where: While specializing "std::wostream ".
"/opt/SUNWspro/prod/include/CC/Cstd/./ostream", line 354: Where: Specialized in non-template code.
"/opt/SUNWspro/prod/include/CC/Cstd/./istream", line 104: Error: Multiple declaration for std::istream::operator>>(int&).
"/opt/SUNWspro/prod/include/CC/Cstd/./istream", line 373: Where: While specializing "std::istream ".
"/opt/SUNWspro/prod/include/CC/Cstd/./istream", line 373: Where: Specialized in non-template code.
"/opt/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 316: Error: A typedef name cannot be used in an elaborated type specifier..
"/opt/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 317: Error: A typedef name cannot be used in an elaborated type specifier..
"/opt/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 318: Error: A typedef name cannot be used in an elaborated type specifier..
"RuntimeException.h", line 131: Error: Function RuntimeException::~RuntimeException() can throw only the exceptions thrown by the function std::exception::~exception() it overrides.
"RuntimeException.h", line 97: Error: Could not find std::exception::exception(const char*) to initialize base class.
"RuntimeException.h", line 121: Error: xmsg is not a member of std::exception.
"Bitmap.cc", line 62: Error: Cannot return int(Bitmap::*)()const from a function that should return int.
11 Error(s) detected.
make: *** [Bitmap.o] Error 11
In Makefile CFLAGS setting are as follows,
### Setup common symbols for .depends
SRC = $(TEST_SRC)
INCLUDES = $(TEST_INC)
# clean objects, executeable, generated .pc -> .c
CLEAN = -r *.o $(PGM_EXEC) Templates.DB/* SunWS_cache/*
include $(ROOT)/h/common.mak
# The system include directory must be specifically included first because some of the
# ghost includes use system include file names (e.g., generic.h)
# Modified these section to compile on TVLAPP1HAG
CFLAGS += -D $(STDOUT_TRACE)
CFLAGS += -Dbool=int -g -D$(MAINLINE) $(OUR_COLLECTION)
#CFLAGS += -compat -Qoption ccfe -abirel=4.1
#CFLAGS += -Qoption ccfe -abirel=4.1
CFLAGS += -I. -m64 -xarch=sparcvis
#CFLAGS += -I. -mt
# Add the flag for multi-threaded apps
LDFLAGS += -lsocket -lnsl -lthread
# declare an empty macro for compiler directive flags, to be command-line
# driven (ie, for -D directives)
CCFLAGS=
CCFLAGS += -DRW_NO_CPP_RECURSION
# The following manipulation of CC and overriding the .cc.o suffix
# dependency is removed here to use what is supplied by default int
# the h/common.mak file.
#XX = CC
#CC = CC
#COMPILE = $(CC) -o $*.o $(CFLAGS) $(CCFLAGS) -c $*.cc
#.cc.o:
# $(COMPILE)
Please HelpHello,
Still I am not able to solve the error. please help me.. Please see the below code...
Error:
s3dvap983:/export/home/pshirode/rel_v95/cc_lib > make
Making dependencies...
cc -g -D__EXTENSIONS__ -D_SVID_GETTOD -I../h -I/app/oracle/product/9.2_32/precomp/public -I. `getconf LFS_CFLAGS | head -1` -D UT_TRACE_FUNCTION -g -D -I. -m64 -xarch=sparcvis -H -w -E 2>&1 >/dev/null Bitmap.cc BitmapData.cc BitmapInputTxnStream.cc BitmapOutputStream.cc UnexpectedException.cc FieldData.cc FieldDataCollection.cc FieldDefinition.cc FieldDefinitionCollection.cc OutputFixedStream.cc ParsingEngine.cc Schema.cc Statistics.cc String.cc TraceStream.cc TxnStream.cc c_api.cc SocketImpl.cc Socket.cc ServerSocket.cc UnixSocket.cc Thread.cc test.cc | grep -v License | grep -v command | ../dvl.bin/mkdep >.depends
Dependencies updated...
CC -g -D__EXTENSIONS__ -D_SVID_GETTOD -I../h -I/app/oracle/product/9.2_32/precomp/public -I. `getconf LFS_CFLAGS | head -1` -D UT_TRACE_FUNCTION -g -D -I. -m64 -xarch=sparcvis -c Bitmap.cc
"/opt/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 316: Error: A typedef name cannot be used in an elaborated type specifier..
"/opt/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 317: Error: A typedef name cannot be used in an elaborated type specifier..
"/opt/SUNWspro/prod/include/CC/rw7/rw/defs.h", line 318: Error: A typedef name cannot be used in an elaborated type specifier..
"RuntimeException.h", line 137: Error: Function RuntimeException::~RuntimeException() can throw only the exceptions thrown by the function std::exception::~exception() it overrides.
"RuntimeException.h", line 103: Error: Could not find std::exception::exception(const char*) to initialize base class.
"RuntimeException.h", line 127: Error: xmsg is not a member of std::exception.
"Bitmap.cc", line 62: Error: Cannot return int(Bitmap::*)()const from a function that should return int.
7 Error(s) detected.
make: *** [Bitmap.o] Error 7
96 class RuntimeException : public xmsg {
97 public:
98
99 /**
100 * Create an exception with a simple error message
101 * @param message The error message
102 */
103 RuntimeException(const char* msg) : xmsg(msg) {}
104
105 /**
106 * Create an exception with an error code, fileinfo, and message. This will
107 * produce an error message that looks like:
108 * in File:%s at line#: %d \n %error_message%
109 *
110 * @param error An integer error code. The catch block can use the error()
111 * method to examine this value
112 * @param fileinfo The location in a source file where the error occured
113 * @param msg The error message
114 * @see RuntimeException.error
115 */
116 RuntimeException(int p_error, const Fileinfo& f, const char* msg)
117 {
118 error = perror;
119 strstream buffer;
120 buffer << "in File:"
121 << f.filename()
122 << " at line#:"
123 << f.lineno() << endl << msg
124 << ends; // required for this strstream library, other versions
125 // like Borland the stream is always null terminated
126
127 xmsg::xmsg(buffer.str());
128 delete buffer.str(); // added by db 03-Jul-98 accoprding to the
129 // ssbuf(3C++) man page - other implementations may
130 // use malloc/free but Solaris uses new/delete
131 }
132
133 /** @return the error code */
134 int error() {return _error;}
135
136 /** Clean up instance */
137 virtual ~RuntimeException() {}
138
139
140 protected:
141
142 /**
143 * Default constructor - not very useful to throw an exception without at
144 * least an error message, so this is reserved for only subclasses.
145 */
146 RuntimeException() : xmsg() {}
147
148 private:
149
150 /** the error code associated with the error */
151 int _error;
152 };
153 -
Hi,
I am getting below wrror while accesing the Ecel:
compile error in hidden module: Essbaselogon. This error commonly occurs when code is incompatible with the version, Platform, or architecture of this applicationIIRC essbase is a financial reporting add-in (Hyperion, or something similar?).
This message is telling you that the add-in is not compatible with your current software. You should check with the vendor who provided the essbase add-in. Tell them what version of windows and Excel (and maybe Hyperion) you are using, and get a compatible
version from them...
If you do not need or run essbase/hyperion/etc then you should just remove/disable the add-in. If it doesn't show in your add-in menu, then you may have to do a repair installation or re-install Excel -
[svn:osmf:] 13314: Fix compile error in logging code.
Revision: 13314
Revision: 13314
Author: [email protected]
Date: 2010-01-06 13:46:17 -0800 (Wed, 06 Jan 2010)
Log Message:
Fix compile error in logging code.
Modified Paths:
osmf/trunk/framework/MediaFramework/org/osmf/net/NetNegotiator.asHi,
Can you please make sure you have Flex 3.2 or higher SDK and then target to Flash Player 10. I have this working on my system and yes, i got the same error when my SDK was below 3.2 and not targeted to Flash Player 10.
Hope this helps. -
J2EE deploytool compile error in generated code.
I write and compile all the code for EJB.
Created .EAR and .WAR files needed for deploy. But when the deploy application tries to generated and compile stub code there is a compilation problem.
Anyone knows how can I solve this? or this is a problem of the deploy app, Is there another one?
I'm using J2EE SDK 1.3 beta version.
THANKS...It's not an Exception. Are compile errors of the generated code.
When you make "Deploy..." from "Tools" menu item of the "Application Deployment Tool", it make some task including source generation and its compilation, so, this compilation have errors. -
Always get same compilation error.. Does'nt matter whatever i write in code
Hi All,
I am getting strange error while compiling my pl/sql code.. it always gives me error
SQL> SHOW ERR
ERROR:
ORA-00942: table or view does not exist
..I always get this error. In sample piece of code , i dont have any table also
SQL> SELECT * FROM V$VERSION ;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
PL/SQL Release 9.2.0.5.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.5.0 - Production
NLSRTL Version 9.2.0.5.0 - Production
SQL> Create or replace FUNCTION check_cid IS
BEGIN
dbms_output.put_line("CHAL");
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line("GHODA");
END check_cid;
2 3 4 5 6 7 8
Warning: Function created with compilation errors.
SQL> SQL> show err
ERROR:
ORA-00942: table or view does not exist
SQL> Create or replace FUNCTION check_cid RETURN NUMBER IS
stat_res NUMBER;
BEGIN
stat_res := 1;
dbms_output.put_line("CHAL");
RETURN stat_res;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line("GHODA");
END check_cid;
/ 2 3 4 5 6 7 8 9 10 11
Warning: Function created with compilation errors.
SQL> SHOW ERR
ERROR:
ORA-00942: table or view does not exist
SQL> Create or replace FUNCTION check_cid() RETURN NUMBER IS
stat_res NUMBER;
BEGIN
stat_res := 1;
dbms_output.put_line("CHAL");
RETURN stat_res;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line("GHODA");
END check_cid;
/ 2 3 4 5 6 7 8 9 10 11
Warning: Function created with compilation errors.
SQL> SHOW ERR
ERROR:
ORA-00942: table or view does not existThe error message is correct.
You are using double quotes instead of single quotes.
Identifiers (table names, column names etc) with special characters should be enclosed by double quotes, so PL/SQL thinks you are using an identifier and can't find it.
Please replace the double quotes by single quotes.
Please also make sure you always try to iron out simple compilation errors yourself, so you become independent, and don't need to ask for the assistance of volunteers.
Optionally, increase your intake of coffee, and/or buy (better) glasses ;)
Sybrand Bakker
Senior Oracle DBA -
Compiler error: Code could not be generated
When I tried to run the example.VI (attached) there was an error:
Compiler error. Report this problem to NI Tech support
copy cvt, csrc = 0X40
bad mode in _GenCopyCOnvertNumCode xc = 0X40
Could anyone help me in this regard.,
Thanks in advance
Rajesh
Attachments:
example_test.vi 44 KBHi,
If I understand correctly, all you want to do is to convert a single to a
binary string.
The attached VI does this. It can be turned into a subvi very easily.
Regards,
Wiebe.
"Intern" wrote in message
news:[email protected]..
> Hi Wiebe,
> I use LV6 and fortunately the VI runs after I changed array
> initialisation of the last 2 inputs. But there prevails a new problem
> in my example VI.
>
> There are 2 more inputs which are in single precision mode. Say,
> N and M are the 2 inputs.
>
> eg.,
> N = 40
> M = 5
>
> I want the numerical conversion of those inputs as 7 bit binary value.
> N = 40 ---> 0101000
> M = 5 ---> 0000101
>
> I could convert the I/P into U8 or I8 type in wh
ich there prevails
> another zero at the MSB that is not interesting for my application. I
> have also attached the updated VI along with this email. You could see
> the inputs which are in single precision mode and the required output
> is a 24 bit word.
>
> N --> 7 bit
> M --> 7 bit
> V --> 1 bit
> X --> 2 bit
> R --> 2 bit
> n so on..
>
> Help me in this regard.
>
> Thanks in advance.
> Regards
> Rajesh
[Attachment Single to Binary.vi, see below]
Attachments:
Single_to_Binary.vi 17 KB -
TSQL code that causes table data to be deleted rather than fail with a compilation error
Afternoon,
I recently did this by accident and it felt as though it should have failed with a compilation error rather than run
A query of the form
delete from jobs
where id in
select id from calibrations
will delete all rows in the jobs table when the id column exists in the jobs table, but not the calibrations table. This should fail with a compilation error.
the following sql can be used to generate a test database to show the problem
USE [test]
GO
/****** Object: Table [dbo].[calibrations] Script Date: 28/11/2014 13:32:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[calibrations](
[JobId] [int] NULL,
[textfield] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[jobs] Script Date: 28/11/2014 13:32:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[jobs](
[Id] [int] NOT NULL,
[Name] [nchar](10) NULL
) ON [PRIMARY]
GO
INSERT [dbo].[calibrations] ([JobId], [textfield]) VALUES (1, N'something')
GO
INSERT [dbo].[jobs] ([Id], [Name]) VALUES (1, N'a ')
GO
INSERT [dbo].[jobs] ([Id], [Name]) VALUES (2, N'b ')
GO
INSERT [dbo].[jobs] ([Id], [Name]) VALUES (3, N'c ')
GO
INSERT [dbo].[jobs] ([Id], [Name]) VALUES (4, N'd ')
GO
INSERT [dbo].[jobs] ([Id], [Name]) VALUES (5, N'e ')
GO
INSERT [dbo].[jobs] ([Id], [Name]) VALUES (6, N'f ')
GO
Simon
simonwill delete all rows in the jobs table when the id column exists in the jobs table,
but not the calibrations table. This should fail with a compilation error.
Hello Simon,
That's a bug in your T-SQL Statement, not in SQL Server. The Statement as it is valid and column "id" exists, so why should it fail on compilation?
And that is the reason why we always should use full qualified object name, e.g. like
delete from jobs AS J
where J.id in
select SUB.id from calibrations AS SUB
and this Statement should fail on compilation.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Why no compile error in this code ?
strings are immutable... we can not alter it... so why the below does not create compile error ? it is an attempt to alter the string.
class test
public static void main(String args[])
String s1 = new String("amit");
s1.concat("Poddar"); // why no error ?
System.out.println(s1);
}strings are immutable... we can not alter it... so
why the below does not create compile error ? First of all, Strings are immuatable because the String class is coded that way - there willnever be a compiler error to stop you from altering a String's value (which is actually possible via reflection). This is similar to you writing your own class that has a private field and not providing any methods that can alter the field's value. Your new class would be considered immutable in the same way that Strings are considered immutable, and nobody can even attempt (except reflectively), to "alter" an instance of it, so there will never be a compiler error that is due to such an attempt.
it is an attempt to alter the string.No it isn't. The following is a quote from the Javadoc for String.concat:
"If the length of the argument string is 0, then this String object is returned. Otherwise, a new String object is created, representing a character sequence that is the concatenation of the character sequence represented by this String object and the character sequence represented by the argument string." -
Flex compilation error code 2830
Hi All ,
When using Layer Iviews with Navigation Control as LINK TREE in my VC model .
Compile error with message as below ,
Error in compiling Flex application: /usr/sap/EPD/JC03/j2ee/cluster/server0/GUIMachine_Business_Packages/Liquidity_June_27_13818/FLEX_COMPILATION_FOLDER/AAD7EI.mxml(2830): Error: Call to a possibly undefined method buildLinkTree.
buildLinkTree();
Appreciate if anyone can help me in resolution .
Thanks
RaviHello Ravi ,
Could you manage to get a solution to your problem , Since i am also facing the same,
If yes could you share as to how did u approach the problem?
Thanks and Regards,
Ronniee
Maybe you are looking for
-
s there a way to resort an ipod touch to the point before a restore was done on it? It is telling me there is nothing in the icloud and I need to reset it back up. The reset was done before I could backup the icloud and itunes to the computer and it
-
Open a pdf with out print or save button
Hello, Is there any way to open pdf with out using save or print and also make other users to not to open the file. thanks
-
Several DB servers but run SSRS on only one or each?
Is it better practice to just turn on SSRS on each instance or designate one server as the primary "report server"? Im tempted to turn on the service on each instance where the DB is located referenced in the report(s).
-
This is probably something very simple but I can't find anything on it. So I would appreciate any insight you may have. It's a very simple program that is dynamically creating buttons at runtime based on XML data which will eventually get served by
-
Itunes freezes when trying to sync my apps on my iphone
Every time I try to sync my iphone it gets stuck on the syncing apps part and itunes stops responding, haven't been able to sync my iphone for months. All my software is fully up to date.