Showing posts with label Error Message. Show all posts
Showing posts with label Error Message. Show all posts

Javascript Error Message: is not a function

This error message appears when you use Varibalized Function (or called Function Literal, Function Reference, Function Pointer) method to declare function while you did not put into right order:

(Caller here)
; var func = function()
{
...
}

Solution 1:

; var func
(Caller here)
; func = function()
{
...
}

Solution 2:

(Caller here)
; function func()
{
...
}


http://www.dustindiaz.com/javascript-function-declaration-ambiguity/
Function Declaration in JavaScript

Error Message: The SELECT item identified by the ORDER BY number 1 contains a variable as part of the expression identifying a column position...

This SQL Server full error message is: "The SELECT item identified by the ORDER BY number 1 contains a variable as part of the expression identifying a column position. Variables are only allowed when ordering by an expression referencing a column name."

It happens when a bind variable is placed in ORDER BY clause. For dynamic SQL, the solution is Database Engine Stored Procedures sp_executesql. For example:

Your failed original statement:
SET @stddev = SELECT STDEVP(@EachColumn)
FROM Temp_IQM_Input
ORDER BY @EachColumn

The solution:
DECLARE @stddevString NVARCHAR(1000)
SET @stddevString = ' SELECT @out = STDEVP(@para) '
+ ' FROM Temp_IQM_Input '
+ ' ORDER BY @para '
DECLARE @stddev INT
EXECUTE sp_executesql @stddevString
, N'@para VARCHAR(32), @out INT OUTPUT'
, @para = @EachColumn
, @out = @stddev OUTPUT
;

For sp_executesql statement, the 1st line is the sql query in string, 2nd line to define the bind variables, if the parameter used for output, it needs to be stated. The rest lines are for variables assignments.

It is painful because there are too many WIP parameters; but it is the way.

Fatal error: Call to undefined function... In PHP

First of all, the information contained in this error message is correct. The error was caused by the caller unable to access the called function, thus regarded as undefined function. There are several possibilities:

1. The function called is located in different PHP file, and it is not included or required by the caller file.

2. The php built-in function called has been deprecated.

3. Having an issue of encapsulation. It often happened when caller itself is not instantiated, and tried to call the function directly. Even if both caller and called are in same class, the PHP rule of encapsulation still applies. To fix up this, the called function must be declared as static, and the calling method need to be:

CalledClass::CalledFunction(); (Method 1)

If it is located in same class of the caller, it can be:

self::CalledFunction(); (Method 2)

When the caller is the object or instantiated of the class, it is necessary to use dynamic way, though it may be a public static function:

$result = $this->calledFunction(); (Method 3)

It would become more complicated when the caller is an function located within an instantiated object. In this case, method 3 does not work. Rather, Method 2 should be used.

Summary:

1. When caller is instantiated and externally called dynamically:
Called function declaration must be public.
Calling method: $instantiatedObject->calledFunction();

2. When caller is instantiated and externally called, and called function declared as static:
Called function declaration would be public static.
Calling method: $instantiatedObject->calledFunction();

3. When caller is not instantiated and externally called:
Called function declaration must be public static, or public when function is not within the class.
Calling method: $className::calledFunction(); or calledFunction(); when function is not within the class.

4. When caller is part of constructor and use dynamic method:
Called function declaration should be: private
Calling method: $this->calledFunction();

5. When caller is part of constructor and called function declared as static:
Called function declaration would be: private static
Calling method: $this->calledFunction();
This is not recommended.

6. When caller is internally located in another function, and called function declared as static:
Called function declaration should be: private static
Calling method: self::calledFunction();

There should be no other circumstances.


http://stackoverflow.com/questions/2220809/calling-a-method-from-another-method-in-same-php-class

Error Message: [rsInvalidDataSetName] The table ‘table1’ refers to an invalid DataSetName...

In SQL Server Reporting Services 2005, when you changed a dataset name or try to point to another dataset name, this error message is often generated as a result. That is right, you have referred to wrong dataset. The problem is it is hard to find where you can change this reference.

First, you need to remember your report may consist of several tables. Each of them usually refers to a different dataset. So, you need to click the table which does cause the trouble, then in Properties panel located at bottom right corner of your screen, to select that table, which is located right below caption “Properties”. In Data section, there is DataSetName. Select what you want.

Error Message: The report definition is not valid. Details: The report definition has an invalid target namespace

Full error message is: The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded.

According to Microsoft, one "cannot publish a report defined in the SSRS 2008 RDL schema to a SSRS 2005 report server." It is true. In one case, it happened when report was defined in Microsoft Visual Studio 2008 (SQL Server Business Intelligence Development Studio) and the SSRS is 2005.

The easiest possible solution is to install Microsoft Visual Studio 2005, because both 2005 and 2008 can co-exist in one machine.


http://connect.microsoft.com/VisualStudio/feedback/details/361103/reporting-services-report-cant-deploy-to-sql-2005

Invalid Argument Error in IE

Sometime you will get Error: Invalid argument in IE. No more other information. And this script runs well in Firefox and Chrome. Indeed, this error message tells true the argument is invalid. However, the problem is not when argument being used, but lies on when you get this argument. In one case:

1 ; var horizonPosi = (window.innerWidth/2 - 50) + 'px'
2 ; headerPainting.style.left = horizonPosi

the problem actually is caused by window.innerWidth. When print out, the argument as horizonPosi is indeed "NaNpx".

Error Message: XML cannot be the whole program

Error message "XML cannot be the whole program" appears when load a javascript file which was generated by PHP file. It actually has nothing to do with its appearance. There are two possible causes:

1. The file contains <script> and </script>. These two scripts indeed are unnecessary because in your html file, it had been already included: <script language='Javascript' src='filename.js.php' type='text/javascript'></script>.

2. Your php code is not clean. It contains some form of invisiable editorial codes inserted by your editor, such as Notepad, etc.

Heredoc and Nowdoc in PHP

Heredoc is to double-quoted string. So the inside can be parsed if there is variable. There is bug associated with Heredoc, namely the line with the closing identifier must contain no other characters, except possibly a semicolon (;). Example:

$err = ‘Parse error, unexpected $end in this.php on line xx’;
<<<HEREDOC
This is to show error message “$err” if you put whitespace either at front or end of closing line.
HEREDOC

Nowdocs are to single-quoted strings however. So a nowdoc is specified similarly to a heredoc, but no parsing is done inside a nowdoc. This is very useful to parse a large block of embedded dynamic codes. Example:

<<<’NOWDOC’
Within this block, though $err is a variable, the final result would be exactly same as what you are seeing now. The variable “$err” won’t be parsed.
NOWDOC

No escape needed for both methods.

In addition, although you can use any word for heredoc and nowdoc purpose, it is recommended using exactly these words to emphasis the difference as well as the help you to remember what these techniques are called.

http://ca2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

How to Compact MS Access 2007

MS Access 2007 sucks. It does not improve what it should do but create new problems. Compact and repair in Access is important, because if you are over the size, it will give you funny error message and consume you next couple of hours to resolve the puzzle. How do you compact the database? Sure you need to find out the “Compact and Repair” in menu. Where is it? Ok, just forget this approach, because it will tell you nothing if it is really compacting for next hour or so, don’t even mention somehow you may completely delete your database. Nice, isn’t?

There is a way to work around it. Just save your database as MS Access version 2000. It will give you a really fast nice compacted new file. Why version 2000? Because version 2000 is the most stable amongst MS Access family. If you like, you then can compact it, again, by click Office button, Manage, Compact and repair… If you like, you can also save back as version 2007.

Where is the Office button? At top left corner, that round thing. Yes, that is it.

Clearing Obstacles for Automation in MS Access

There are many obstructive dialogue windows require manual response, which does really slow down the automation process. In one special case, MS Access is used to construct and update a considerable huge data warehouse. The update automation macro consists of over a hundred queries. The dialogue windows effectively destroy the automation itself.

Many of these dialogue windows can be set in Access Options. However, a special window cannot be resolved through setting. The message is “There isn't enough disk space or memory to undo the data changes this action query is about to make.” This is caused by running action queries on a large table.

Support of Microsoft regards this as an error message: http://support.microsoft.com/kb/161329, which also provides a number of solutions. Method 3, Setting the UseTransaction Property in an Action Query is particularily helpful:

If a stored action query causes the error, you can set its UseTransaction property to No. Note that if you do this, you will not able to roll back your changes if there is a problem or an error while the query is executing:

1. Open the query in Design view.
2. On the View menu, click Properties.
3. Click an empty space in the upper half of the query window to display the Query Properties dialog box.
4. Set the UseTransaction property to No.
5. Save the query and close it.

Most important, you would need to set no warnings, as follows:

1. In your first Macro row, right click mouse to insert a new row.
2. Click "Show All Actions" in Show/Hide menu.
3. In Action of your inserted first row, select SetWarnings.
4. Change Arguments value of the first row to "No".
5. Click Save.

Now you are ok to run Macros without any warning.

Labels