null

Finding data that's missing from the database

I need to figure out some clever MySQL snippet that will allow me to easily see two tables, the ids in the table if they exist or NULL or empty if they don't exist. I have a users table and a legacy table and outside of manual comparison I can't figure out how to make them appear in a table together so I can compare. What I would love ...

Why C++ delete operator doesn't set pointer to NULL?

Possible Duplicate: Why doesn't delete set the pointer to NULL? Is there any purpose for a pointer to deallocated memory? ...

Issues in log4net with dynamic filenaming in RollingFileAppender

I have 3 appenders in my config file for creating 3 different types of logs. I am using dynamic naming of file in each of the 3 appenders by setting the global context properties. In some cases, i need to set the log file name dynamically for just 1 appender. When i set the file name for just 1 appender, it creates another file named "nu...

handling null paramaters in mysql procedure - not working

I am passing null to below procedure as below its is not returning any values even if data is there in the table? call view_ads (NULL,'vehicles',9); call view_ads ('placename',null,9); ===================================================================================== below is the code delimiter $$ drop procedure view_ads$$ create...

I can't compare sql_variant field with IS NULL operator

I mean I can't query null values when column type sql_variant For example docsdate table look like this: ValID DocID Value <--sql variant column) 1. 488 146 30.10.2007 2. 740 190 31.03.2008 3. 570 161 31.10.2008 4. 242 103 NULL 5. 248 104 NULL When query like select * from docsdate where value is ...

Storing NULL characters (ASCII 0)

I've created a program in C++ that prompts the user for a filename and for the requested filesize. The program checks if the requested filesize is bigger than the actual filesize and then adds null characters (the ones with code 0) at the end of the file, until the requested filesize is reached. I have done it like this (with fstream): ...

MySQL: how to prevent insertion of a row with all columns = NULL ?

In my MySQL table, every column by itself can be NULL, but there must be at least one column with a non-NULL value. At the moment, I am wrapping an insert statement in a stored procedure which prevents insertion of all-NULL rows, but that of course does not keep anyone from using native INSERT statements, circumventing my wrapper procedu...

Check if C++ Array is Null

how do i do that? well i want to check if the array is empty ...

In Scala, how can I pass null to a Java method that expects Long?

I have a Java method that accepts a Long value: (in Java) public void setValue(Long value); I understand that the Scala null does not extend any of the value types, including Long. Therefore, when I try to pass null to it, I get a compilation error: (in Scala) javaThing.setValue(null) ==> type mismatch; found : Any required: java.l...

Why does column = NULL return no rows?

Possible Duplicate: Why does NULL = NULL evaluate to false in SQL server If you generate a query to insert the data in table "MyTab" for column --- Age, Sex, DOB, ID INSERT INTO MyTab VALUES (22, '', '', 4) What'll be the value in column Sex & DOB ? Is it NULL ? If value is NULL then --- SELECT * FROM MyTab WHERE Sex=...

How to handle NULL values in mysql/php?

In MSSQL Server, we make queries for null values like below: SELECT name, ISNULL(about, ''), contact FROM `user_profile` WHERE userid=1 But when I am trying to do the same with MYSQL then it gives error. What is the logical and easy way to handle NULL values in php/mysql scenario. Thanks ...

'var' is null or not an object

The code works fine in Firefox, but not in IE8. I'm getting an error: 'address' is null or not an object. Have been googling for days and couldn't get a clear answer on how to fix/debug this. Hope stackoverflow.com can help. var latlng = [ { address: new GLatLng(-6.1364941,106.8000411), marker0: myIcon0 }, { address: new GL...

Ruby use case for nil, equivalent to Python None or JavaScript undefined

How does Ruby's nil manifest in code? For example, in Python you might use None for a default argument when it refers to another argument, but in Ruby you can refer to other arguments in the arg list (see this question). In JS, undefined pops up even more because you can't specify default arguments at all. Can you give an example of how ...

Javascript: This if statement should not detect 0; only null or empty strings

How do I NOT detect 0, but otherwise detect null or empty strings? ...

DataItem on Repeater.Items is always null

I am setting the DataSource of my repeater to a List (MyProducts is a simple class, consisting of only get/setters). After this and DataBind(), I can see in debugging mode that DataItem of each Repeater.Items is null. When making a postback and trying to update MyProducts, the Repeater.Items[n].DataItem is still null and Im not able to ...

Issue with NULL pointers on Harvard Architecture platform

Interesting issue we came across here this week. We are working in C on a Harvard Architecture embedded platform, which has 16-bit data addresses and 32-bit code addresses. The issue occurs when you are working with function pointers. If you have code like if (fp) fp(); or if (fp != 0) fp(); everything is fine. However if you ...

Access query from VB.NET - To insert data though they are NULL

Hi I need to insert data from DB to another DB. I run this query from VB.NET: for example: Insert into DBDestino.tablaDest (campo1,campo2) select valor1,valor2 from DBOrigen.tablaOrigen Field "campo1" is integer (in DBdestino) But sometimes the value "valor1" (in DBOrigen) is NULL. If I run the previous query, it returns error a...

Dealing with null values versus empty strings in a database when only empty strings are coming from the client via HTTP POST

My MySQL database has carefully defined fields. Some fields, if there is a chance that they can be unknown, allow a NULL value. I'm writing a web-based CMS to handle the data in said database. Obviously, the post arrays from the HTML forms never contain null values, only empty strings. I don't want to confuse the users of my CMS by ad...

How to avoid multiple if null checks

Possible Duplicates: Deep Null checking, is there a better way? C# elegant way to check if a property's property is null i have to do a lookup in a deep object model like this: p.OrganisationalUnit.Parent.Head.CurrentAllocation.Person; is there anyway to evalute this and return null if any of the chain is null (organiza...

C#: should object variables be assigned to null?

In C#, is it necessary to assign an object variable to null if you have finished using it, even when it will go out of scope anyway? ...