null

Migrating DB2 UDFs from AIX to Linux (RHEL)

I successfully compiled some UDFs on 64-bit Linux that were originally compiled on AIX Linux is running IBM DB2 v9.5 Here's the function that sometimes returns for some values #include <cstdlib> #include <cstdio> #include <iostream> #include "cbudf.hpp" using namespace std; extern "C" void SQL_API_FN cbzdt(SQLUDF_VARCHAR_FBD *pArg,...

Passing Null/empty string to Oracle stored procedure from asp.net

We have an ASP.NET web service that invokes a stored procedure on our DB (Oracle 11g). The problem is that the call to the procedure blows up every time an empty string is passed as one of the parameters. We're seeing an ORA-01084 error, which indicates to me that call is failing before the procedure is actually run. Here's the proced...

Semantics of the Boolean and comparison operators in the context of three-valued-logic

Hi People! Professor ask me this question: What is the semantics of the Boolean and comparison operators in the context of three-valued-logic? I'm not sure what he meant by that. What is comparison operator? Is that the same as relational operator? Semantics? He asking about 'meaning' of those two terms in context of three-valued-log...

SQL Record Search But Field is Sometimes NULL?

Hi, I am trying to do a SQL query to see if an Address already exists in my database. My addresses are structure like this: line1 line2 line3 city state zipcode country Sometimes line2 and line3 are NULL values in my database. I am using .NET TableAdapter and DataTable to make my query. When I try to pass in my line2 parameter (@lin...

MS-SQL Average Columns with NULL

So I've got 3 different columns (basket 1, 2, and 3). Sometimes these columns have all the information and sometimes one or two of them are null. I have another column that I'm going to average these values into and save. Is there a sleek/easy way to get the average of these three columns even if one of them is null? Or do I have to hav...

Null checking the null object pattern

The main goal of the Null Object Pattern is to ensure that a usable object is provided to the client. So we want to replace the following code... void Class::SetPrivateMemberA() { m_A = GetObject(); } void Class::UseA() { if (m_A != null) { m_A.Method(); } else { // assert or log the error } } ...with...

Python check for blank CSV value not working

I have a CSV file and I am running a script against it to insert into a database. If the value is blank then I don't want to insert it. Here is what I have if attrs[attr] != '' and attrs[attr] != None: log.info('Attriute ID: %s' % attr) log.info('Attriute Value: %s' % attrs[attr]) sql = insert_attr_q...

Understanding Actionscript Garbage Collection

in an attempt to see and hopefully understand actionscript's garbage collector, i've set up a sample project that loop-tweens the value of a pixel bender parameter on stage. my first concern was the amount of memory that was being used at launch (~26 MB). while i like to believe i'm cautious about memory by removing event listeners and...

using cakephp, how do I handle model operations that return no results so my view doesn't break?

In my controller I have model operations that can return empty results. I've setup the view to display the results using a foreach loop. But if the model opertion is empty and returns no results then the foreach loop is breaking in my view. This is the operation: $match3 = $this->Draw->Match-> find('all',array('conditions'=>array('Matc...

asp.net MVC ModelState is null in my Unit Test. Why?

ModelState is always returning null in my unit tests. I was hoping someone could tell me why. Given the following controller: public class TestController : Controller { public ViewResult Index() { return View(); } } My test gets null for ModelState with this test: public void ModelState_Is_Not_Null() { TestCon...

NULL Characters in Firebird VARCHAR

Hello there, Im trying to find records in a VARCHAR column that may contain a NUL (0x00), and I cannot find a way to locate the NUL character. Any ideas are welcome. -Israel ...

How do I Return 0 From a MySQL db When the Term in the Where Clause is Not in the database?

How do I get my mysql database to return 0 if the neighborhood in the WHERE clause doesn't exist? So in the example below, Old Town is not in the database. I'd like the database to return 0 incidents instead of an empty result. SELECT incidents, neighborhoods FROM `myTable` WHERE neighborhoods ='Old Town' I also tried SEL...

Identifying and removing null characters in UNIX

I have a text file containing unwanted null characters. When I try to view it in I see ^@ symbols, interleaved in normal text. How can I: a) Identify which lines in the file contains null characters? I have tried grepping for \0 and \x0, but this did not work. b) Remove the null characters? Running strings on the file cleaned it up, bu...

Flex Null Integer

Hi; I take data from Java to Flex by AMF (BlazeDS) In java side object has Integer field. So it can be null. In Flex side object is int. So null values are deserialized as 0. This is not what I want, I want to see whether it is 0 or null. Is there wrapper like (Integer in Java) for Flex? Thanks ...

Filtering DBNull With LINQ

Why does the following query raise the error below for a row with a NULL value for barrel when I explicitly filter out those rows in the Where clause? Dim query = From row As dbDataSet.conformalRow In dbDataSet.Tables("conformal") _ Where Not IsDBNull(row.Cal) AndAlso tiCal_drop.Text = row.Cal _ AndAlso Not IsDBN...

LINQ query null reference exception

Hi! I have the next query: var bPermisos = from b in ruc.Permisos where b.IdUsuario == cu.Id select new Permisos(){ Id=b.Id, IdUsuario=b.Id, IdPerfil=b.Id, Estatus=b.Es...

PHP json_decode() returns NULL with valid JSON?

I have this JSON object stored on a plain text file: { "MySQL": { "Server": "(server)", "Username": "(user)", "Password": "(pwd)", "DatabaseName": "(dbname)" }, "Ftp": { "Server": "(server)", "Username": "(user)", "Password": "(pwd)", "RootFolder": "(rf)" }...

Richfaces a4j achtionparam set null value

I am trying to reset some values in a form using the a4j:actionParam tag. But it seams that null values never arrive in the target bean. The converter receives it correctly, returns null, but it is never set in the bean. The target is to fill in the start and endDate for different predefined values (last week, last month etc). For the "...

"IS NULL" in Zend_Db_Table select not working

I'm trying to do a join on 2 tables in Zend, using the DbTable / model / mapper structure. If, in my mapper, I do this: $select = $this->getDbTable()->select(Zend_Db_Table::SELECT_WITH_FROM_PART) ->setIntegrityCheck(false) ->join('images', 'images.oldFilename = availablePict...

How should I index a table to optimize to find null?

I've got a table and the only time I'll be selecting or doing anything against it is to find all the rows where a certain date column is null. From there, I do stuff with it and update that column, and likely I'll never visit that row again, with the exception of auditing purposes. So, is there a best practice to ensure that the rows w...