null

can this be written with an outer join

The requirement is to copy rows from Table B into Table A. Only rows with an id that doesn't already exist, need to be copied over: INSERT INTO A(id, x, y) SELECT id, x, y FROM B b WHERE b.id IS NOT IN (SELECT id FROM A WHERE x='t'); ^^^^^^^^^^^ Now, I was trying to write this with an outer join ...

Turning automatic nulls off for inserts to FoxPro tables through NHibernate using JetDriver isn't working.

I'm using NHibernate with Burrow and Fluent to shuttle data from SQLServer2005 into a directory full of FoxPro 7 dbf's. When I try to save a new record through Burrow's GenericDAO, I get an exception that boils down to "Field XXX does not accept null values," where field XXX is a NOT NULL field that is not being mapped at all because it...

handling null in json or javascript

Im using an ajax json response to build some html to place in a webpage. Occasionally I'll come across an empty value in my json. This results in an empty object being placed into the html. I would prefer not to check that each value is not an object, as that doesn't seem efficient. Is there a better way? my code works like this ...

Sql Datareader null values

I am reading from a SQL datareader in C# and passing the values from the columns to a dropdownlist. There are two columns being read. Using IsDbNull, I am able to handle the null values. However, as I have the code written right now, if dr.GetString(0) is null, no values are passed along at all, while as long as only dr.GetString(1) (or ...

Updating a null cell - this stored procedure isn't working - why?

im doing a gym software. i have a signin signout system.when members sign in this data is put in a table leaving the signout colomn empty.then when member sign out the signout cell is updated.up to here is fine. but if the member signed in and out twice i dont want the sigout time of the first time to be changed.i want only the null cell...

Is null an Object?

Is null an Object in Java? ...

Replace or Disable null-value in Datagrid in a formsapplication

I'm working on a formsapplication with a datagrid in it. How can I disable or replace (null)-values in cells when im databinding the grid to a database. When I am in the Designer view and clicking on the little arrow on the grid,I only see the option "Autoformat" ...

Comparing window.parent/opener with NULL or 'undefined'

If I have this method: this.getForm = function () { try { var frmIndex = arguments[0]; if (isNaN(frmIndex)) frmIndex = 1; if (window !== null) { if (window.opener !== null) { return window.parent; } else if (window.parent !== null) { if (window.parent.frames !== null) { if (window.parent.frames(...

Which Exception to throw when a method try to use a field that can be null?

Hello, I am actually working on a Framework development, which means require a really strong coding methodology. I am facing a problem where I do not know which System.Exception derivated class I need to throw. Basically the case is when I have a class with fields that can be optionnaly initialized by the constructor and that have meth...

Oracle View problem with Select and divison zero

Hi Folks, following problem, i want to create an view in Oracle wich calculates an "utilization rate in percent". AS SELECT sw.SWITCH_ID, sw.ASSET_ID, sw.SYSTEMNAME, sw.MAX_INSTALLABLE_PORTS, sw.INSTALLED_PORTS, sw.USED_PORTS, (sw.INSTALLED_PORTS/sw.MAX_INSTALLABLE_PORTS)*100 AS UTIL_INSTALLED_PORTS, sw.RES_INFRASTRUCTU...

SQL Server warning message about nulls

This warning message I get from time to time from SQL server ... Warning: Null value is eliminated by an aggregate or other SET operation. Is this just saying that a value that was Null is being set to something other than Null. Why do I need to be 'warned' about this? ...

Checks nulls using LINQ

Hi all, I have this code. How can I check null values for SingleOrDefault method ?? public static List<ETY.Rol> GetRolesByApplicationAndCompany(this UsuarioContext usuario, int company, int app) { List<ETY.Company> lCompanies= usuario.Companies; var roles = lCompanies. SingleOrDefault(e ...

is this explicit cast necessary when I know it isn't null?

I have the following: MyEnum? maybeValue = GetValueOrNull(); if (null != maybeValue) { MyEnum value = (MyEnum)maybeValue; } What I want to know is if that explicit (MyEnum) cast is necessary on an instance of type MyEnum?. This seems like a simple question, I just felt paranoid that there could possibly be some runtime error if ...

Is it good practice to NULL a pointer after deleting it?

I'll start out by saying, use smart pointers and you'll never have to worry about this. What are the problems with the following code? Foo * p = new Foo; // (use p) delete p; p = NULL; This was sparked by an answer and comments to another question. One comment from Neil Butterworth generated a few upvotes: Setting pointers to NUL...

Is it a good practice to set the default value of some field/column as NULL in MySQL?

What are the disadvantages to do so? ...

Does free(ptr) where ptr is NULL corrupt memory?

Theoretically I can say that free(ptr); free(ptr); is a memory corruption since we are freeing the memory which has already been freed. But what if free(ptr); ptr=NULL; free(ptr); As the OS will behave in an undefined manner I cannot get an actual theoretical analysis for this about what's happening. Whatever I am doing, is th...

Asynchronous HttpWebRequests and a null HttpContext.Current.Response/Request object.

I have a web application the relies heavily on web services. Everything with the services is done asynchronously and with AddOnPreRequestHandlerExecuteAsync. Anyhow, most of my calls work just fine, but some are returning from their asynchronous service calls to find a null HttpContext.Current.Response/Request object in the endprerequest...

#define NULL NULL

#ifndef NULL #define NULL NULL #endif This code compiles in gcc with no warnings/errors. Can someone explain what the preprocessor is doing here? ...

Attribute becomes null in event handling

in a simplified version, what i have is this: public class MyLabel extends JLabel implements MouseListener{ private SomeControl control; public MyLabel(SomeControl control){ this.addMouseListener(this); this.control = control; } @Override public void mouseClicked(MouseEvent arg0) { Object x = this.control.getSomeProperty(); } Eve...

Monotouch ABAdressBook GetPhones Check For Null

ABAddressBook mybook = new ABAddressBook(); ABPerson[] allPeople = mybook.GetPeople(); foreach(ABPerson thisPerson in allPeople){ if(thisPerson.GetPhones() != null) ABMultiValue<string> myMultiPhone = thisPerson.GetPhones(); } } I have the previous code in my application. With Monotouch build 1.4 my applicat...