Currently, whenever I pass a string to the db, if that string is empty, then i set that object to NULL by doing the following:
IIf(DescriptionTxt.Text.length > 0, DescriptionTxt.Text, DBNull.Value)
I was thinking about writing a function to reduce the length of this code, and make it more consistent.
However, I was wondering, is ther...
Hi
I'm developing a class to manage the operations on a Mysql database.
I have the following code:
using System;
using MySql.Data.MySqlClient;
public class MysqlAccess
{
private MySqlConnection pCnn;
public enum OperationType {Select = 1,Insert = 2,Update = 3,Delete = 4};
public MysqlAccess()
{
MySqlConnecti...
I've got this stored procedure, and when I add the join I get no results. Is this because the column used for the join condition, ForClientID, is null? Would that affect the results of the table? If i select the table with Appointment.ForClientID instead of Client.Name, the rest of the table loads with the ForClientID column being null. ...
Hi,
I have a cube that I access via Targit (BI Solution). When I browse / use that cube I want all quantity results to be a zero if null / blank NOT a blank, but no matter what I try I get blanks. I have changed the Null Processing property for the measure in question as well as attempted to change / remove the format string. I still...
I'm looping through an array in JavaScript to check for null in each object using jQuery, what would be the best cross browser solution for this?
...
I came across the following code recently:
class Foo
{
public:
void bar();
// .. other stuff
};
void Foo::bar()
{
if(!this) {
// .. do some stuff without accessing any data members
return;
}
// .. do normal actions using data members
}
The code compiles because in C++ methods are just functions th...
I'm trying to sort a list of dates, but I'm struggling with null dates which aren't being handled consistently.
So I need something like:
var date = Date.parse(dateString);
if (!date) {
date = Date.MinValue;
}
but I'm struggling to find the correct syntax. Thanks
Update: The bug turned out to be a different problem. I have Dat...
Dear all,
I´d love to do something like this, but with a working syntax of course :)
MIN(CASE WHEN col=2
THEN CASE WHEN answer IS NULL THEN 0 ELSE answer END END)
i am trying to prevent a view from getting NULL values and use zeros instead.
Here is my SELECT query that creates the view:
SELECT result,question_id,
MIN(CASE WHEN col...
Suppose I have a instance variable that has original value:
Integer mMyInt = 1;
There are two threads.
The first changes mMyInt by calling:
void setInt() {
mMyInt = 2;
}
The second thread gets mMyInt by calling:
Integer getInt() {
return mMyInt;
}
Both threads don't use synchronization.
My questions is, what is the possi...
<?xml version="1.0" encoding="utf-16"?>
<users>
<user number="0772247157">
<step stepnumber="1">complete</step>
<step stepnumber="2">complete</step>
<step stepnumber="3">complete</step>
</user>
<user number="0772247158">
<step stepnumber="1">complete</step>
<step stepnumber="2">complete</step>
</user>
<user ...
Hi all
Just a quickie ... I have the following ID generator strategy for one of my mapped classes:
<id name="UID" type="System.Guid">
<column name ="UID" sql-type ="uniqueidentifier" />
<generator class="guid.comb" />
</id>
The entity in question is involved in synchronisation / merging behaviours from which it is necessary t...
Hello,
I have an asp.net application that is getting its data from sql server. I am using an entitydatasource that gets the data for a detailsview.
I templetized the detailsview in the "edit" mode so that I can give the user a asp.net calendar control to select a date.
The problem is that when the user clicks on the "edit" button at ...
So I'm having a rather tumultuous conversion to C++ from Java/C#. Even though I feel like I understand most of the basics, there are some big fat gaping holes in my understanding.
For instance, consider the following function:
Fruit&
FruitBasket::getFruitByName(std::string fruitName)
{
std::map<std::string,Fruit>::iterator it = ...
How do I refer to the null object in Python?
...
I wrote this program in Java
public class Why {
public static void test() {
System.out.println("Passed");
}
public static void main(String[] args) {
Why NULL = null;
NULL.test();
}
}
I read that invoking a method on a null object causes NullPointerException, and yet the above program doesn't? Why is this? Am I n...
I have a very strange issue where SelectionList always returns NULL when i try check its Selected Item/Value. I Googled a bit and I found out that when i click the submit button, the page is being refreshed and the SelectionList is being data bound again so it will revert back to its original behavior.
Then i tried enclosing the bindin...
I have the following query :
SELECT *
FROM Table1
PIVOT
(
SUM(Value)
FOR [Period] IN ([06/1/2007],[07/1/2007])
)
AS p
Some of the rows returned are null but i want to replace them with 0.
I've tried SUM(ISNULL(Value,0)) as Val but it's not working. ( it's saying incorrect syntax)
...
hi my dear friends :
I want to check multiview, ActiveViewIndex with Javascript,
but in the below code, MultiView is always null:
document.onkeyup = onkeyupOfDocument;
function onkeyupOfDocument(evt) {
var evt = evt || window.event;
var MultiView = document.getElementById("MultiView1");
alert(MultiView);
}
How can i f...
I have written my Container<T> class which backups its T items in several collections -- primary one is List<T>, others are various maps with data derived from items, mostly for optimized search.
Class looks like this:
class Container<T> implements Serializable {
private static final long serialVersionUID = 1L;
private final ...
hi my dear friends :
how can i get multiview in javascript or jquery ?
below code always returns null : (Javascript)
var MultiView = document.getElementById("MultiView1");
and below code is not null but not work :(jquery)
var MultiView = $("*[id$='TextBox1']");
what is the going on about that?
can u give me plz a sample code fo...