null

How do I exclude null rows without excluding null cells when pulling Excel into C# using SQL (ADO)?

I have a query like the following: SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Excel Driver (*.xls)};DBQ=D:\test.xls','SELECT * FROM Sheet1$]') This brings back rows that are all null if they were ever edited and then deleted. I want to exclude those, but still include rows that have good data but possible null cells. My ...

How does one configure XTerm on Mac to correctly interpret nulls in man output?

Using XTerm, ssh to a linux box and run this: $ man ascii | grep BEL 007 7 07 BEL â\aâ (bell) 107 71 47 G Do the same from Mac Terminal: $ man ascii | grep BEL 007 7 07 BEL ’\a’ 107 71 47 G od output of above: $ man ascii | grep BEL | od -ta 0000000 sp sp sp sp ...

SQL INNer Join On Null Values Question

I have a Join SELECT * FROM Y INNER JOIN X ON ISNULL(X.QID, 0) = ISNULL(y.QID, 0) Isnull in a Join like this makes it slow. It's like having a conditional Join. Is there any work around to something like this? I have a lot of records where QID is Null Anyone have a work around that doesn't entail modifying the data ...

h:inputText return a empty string instead of NULL

Hello, i make a JSF 2.0 Application and i use many h:inputText fields to input data in my database. Some fields are not required <h:inputText value="#{registerBean.user.phoneNumber}" id="phoneNumber" > <f:validateLength maximum="20" /> </h:inputText><br/> When the user leave this fie...

How to set NULL to Variant field using rtti

Hi, I have a problem setting null to a variant field using rtti. Suppose I have class like this: TClass1 = class Field1:Integer; Field2:Variant; end; when I get access to a Field1 I can do: Field.SetValue(TObject(ValueObject.AsObject), 1); but it seems I can not do this with Field2: Field.SetValue(TObject(ValueObject.AsOb...

Application_PreRequestHandlerExecute: null HttpContext.Current?

Is it safe to always assume that HttpContext.Current will be non-null in Application_PreRequestHandlerExecute? EDIT: Assuming ASP.NET webforms (not MVC). ...

PHP constructor to return a NULL.

Just a short question :) I have this code. I wonder if it is possible for a User object constructor to somehow fail so that $this->LoggedUser is assigned a NULL value - object is freed after constructor returns. $this->LoggedUser = NULL; if ($_SESSION['verbiste_user'] != false) $this->LoggedUser = new User($_SESSION['verbiste_user'])...

MySQL "NULL" questions

I have a table with several columns. Sometimes some of these column fields may be empty (ie. I won't use them in some cases). My questions: Would it be smart to set them to NULL in phpmyadmin? What does the "NULL" property actually do? Would I gain anything at all by setting them to NULL? Is it possible to use a NULL field the same w...

Difference between these two statements? - C++

Hi, I'm a programming student trying to better understand pointers, one of the things I learned is that you can set a pointer to NULL. My question is, what's the difference between these two statements? When would each of them return true/false? if (some_ptr == NULL) if (*some_ptr == NULL) Thanks! ...

How to select columns from a table which have non null values ?

I have a table containing hundreds of columns many of which are null, and I would like have my select statement so that only those columns containing a value are returned. It would help me analyze data better. Something like: Select (non null columns) from tablename; I want to select all columns which are not-nullable for all rows. Ca...

Is there a reason to check for null inside multiple using clausule in c#?

Is there a reason to check for null in the last using? Seems to me like it's most likely not gonna be needed? using (var connection = new SqlConnection(connectionString)) { using (var command = new SqlCommand(commandString, connection)) { using (var reader = command.ExecuteReader()) { if (reader != null) { // Use...

C# How to debug Control.DoDragDrop Method

Hi ! I'm reading a foreign source code and there occurs sometimes a NullException by Drag'n'Drop operation. The problem is, that all parameters are never null, so I'd like to be able to debug this method somehow. Any ideas ? ...

DPAPI encryted section returns null

Hi, I am encrypting the appSettings and the connectionStrings sections in the app.config file. But when I try to read the value, its always returning null. I am not sure if I am missing something. I thought the decryption was transparent. Has anyone else had any success with reading DPAPI protected sections in the app.config file. ...

What happens when a static method is invoked using a null object reference?

public class CallingStaticMethod { public static void method() { System.out.println("I am in method"); } public static void main(String[] args) { CallingStaticMethod csm = null; csm.method(); } } Can someone explain how the static method is invoked in the above code? ...

ASP.NET MVC routing conflict - null value for input variable

I'm at a loss as to why my routes are conflicting. I have these in my Global.asax file: routes.MapRoute( "CustomerView", "{controller}/{action}/{username}", new { controller = "Home", action = "Index", username = "" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", ne...

Microsoft Access 2003 SQL Question

I need to union several tables with the different structure in Microsoft Access. For example I have table: table1 (column_a,column_b,column_c), table2 (column_a,column_c), table3 (column_d) SQL looks like follows: SELECT table1 column_a,column_b,column_c, Null as column_d FROM Table1 UNION SELECT table2 column_a,Null as column_b, co...

No result in LINQ query gives Object reference not set to an instance of an object in IF ELSE statement.

I have the following code: DataClasses1DataContext db = new DataClasses1DataContext(); var UserInfo = db.Users.FirstOrDefault(u => u.Email == TextBox1.Text); if (UserInfo.Email != null) { Label2.Text = "Email is not null"; } else { Label2.Text = "Email is ...

Converting '' to NULL in doctrine and symfony

Im using the symfony framework with mysql. I have a field in mysql that is generated by doctrine as: weight: { type: double, notnull: false, default: NULL } `weight` double(18,2) NULL DEFAULT NULL The value is entered using a textbox and the generated sql trys to insert '' into this field if no value is given. This produ...

WCF Call Passing a Null Parameter

I have a WebHttpBinding WCF service that I am calling. My first POST method send the object correctly, but subsequent calls to POST methods are passing null for the object. Here is my service: public void Update(ObjectDTO objectDTO) { string token = WebOperationContext.Current != null ? WebOperationContext.Current.IncomingRequest.He...

Android: problem retrieving bitmap from database

When I'm retrieving image from the sqlite database my Bitmap object bm return null value can any one help me..? I found problem in my database.. When I store the byte array in blob data type in database table that time the size of the byte array was 2280.. But when i retrieved that blob data type using select query I get the byte arra...