SharePoint, SiteMinder, and Client Integration

by shuff 9/28/2007 7:14:00 PM
In a prevous post about Sharepoint and SiteMinder someone asked how to handle Client Integration. Although I haven't gotten a chance to actual try it yet I believe if you change the line of code in my sample with the method RedirectFromLoginPage to:

System.Web.Security.FormsAuthentication.RedirectFromLoginPage(HttpContext.Current.User.Identity.Name.ToString, True)

which is basically just changing the last paramter from False to True everything should work. This should persist a cookie on your machine that Office can use to get the login information. I'll be trying this at work in a couple of weeks but if someone else gets to try it before me let me know if it works or not.

Tags:

IN-LINE SQL and LINQ To SQL

by shuff 9/28/2007 7:00:00 PM
I was reading a blog today about in-line sql today that referenced a old well known post called "Stored procedures are bad, m'kay?".

It got me thinking about LINQ. Most of us have been taught to believe in-line SQL is a bad idea and which I agree. But then Microsoft comes out with LINQ and more specifically LINQ to SQL and I hear no one talking about in-line SQL being a bad idea any more, at least not in reference to LINQ.

Now - I have not even done anything with LINQ but read some articles and watch some videos of other programming in it... and I could be way off base. I'll be in Vegas for the DevConnections show in November and can't wait to learn more about LINQ!!!

Tags:

VB6 MAKE EXE GRAYED OUT

by shuff 9/27/2007 6:01:00 AM
Yes - we still have some legacy VB6 apps laying around and today I suddenly couldn't make an exe out of any of them. The option was just grayed out. I could run the project in vb6 though.

Here is the fix I found and this is so strange but I hope it helps someone:

Right Click on the Menu Bar...
Select Customize...
Select Reset....

Everything should be fixed now. Why? I have no idea, but i hope this helps someone else.

Tags:

Watch Out For NULL in SQL Server Query

by shuff 9/12/2007 7:50:00 PM
I noticed something interesting tonight that I'm not sure I knew :)

It has to do with those tricky NULL values in SQL.

Say you create a really simple table Called tblTest2 with the following fields:

Field: Number
Data Type: int
Allow Null?: Yes

Field: Name
Data Type: VarChar(50)
Allow Null?: Yes


Then you insert the following records:

INSERT INTO tblTest2 (Number, Name) Values (5, 'steve')
INSERT INTO tblTest2 (Number, Name) Values (null, 'steve')
INSERT INTO tblTest2 (Number, Name) Values (10, 'huff')
INSERT INTO tblTest2 (Number, Name) Values (null, 'huff')


If you write the following query:

SELECT * FROM tblTest2 WHERE number <> 5

What would you expect to see in your result set? Without giving it much thought I'd expect to see all records with number values <> 5 so I'd expect to see:

null - steve
10 - huff
null - huff

BUT - that is WRONG. The key is in the sentence "I'd expect to see all records with number values <> 5"

null is the abcense of a value. So what the query really returns is:

10 - huff

to get what I thought I'd see I'd have to say:

SELECT * FROM tblTest2 WHERE number <> 5 or number is null

Tags:

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Steve Huff
A developer in the Greater Cincinnati/Northern Kentucky area.

E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in