Monthly Archives: November 2004

Temp Tables in SQL 2000

I had a hard time remembering how to do this and was not using the right keywords in Google.

There are a few ways to do temp tables in SQL. In SQL7 we could use a #tablename, but there are issues with that. It becomes part of the returned resultset and you have to remember to delete them.

In SQL2000, you can still use that syntax but in many cases a table variable is a much better route. It is a variable declared in your stored procedure, it is local so you don’t have to worry about deleting it and it does not affect the result set.

NOTE: You must include “SET NOCOUNT ON“ at the beginning of your stored procedure to prevent that extra gunk in the result set that ADO retrieves. I found that this works with table variables, but it does not fix the problem with #temptables.

Here’s a useful article on it: http://www.sqlteam.com/item.asp?ItemID=9454 with syntax and caveats.

I had a sproc using the #temptable method that worked just fine here on my test server which is SQL2000. When I deployed it to my client’s production server, also SQL2000 with latest service packs, ADO (in VB6 , not ado.net) was having an issue against the production database with recordset.next that did not show up when I ran against the local database. So I went with the table variable instead.



Posted from BLInk!

Designing Crystal reports – from a database vs. from ADO.NET

One of the advances of Crystal in version 8 was that we had the ability to create TTX files from our recordsets and then use the TTX files to design reports from. This alleviated a huge headache of being forced to either use that mistake of a database environment or hooking directly to databases to create reports. Building these dependencies between the report and one of those resources meant confusing memory problems when you ran the report. The TTX file was just a little text file that contained the schema of your recordset. Once the report was designed, you didn’t even need to tote the ttx file around anymore.

In .NET, this evolved to the ability for the report to be designed from an ado.net dataset. You do this by creating a dataset object in your project and linking to that when you design the report. I generally create the object by doing a dataset.writexmlschema in my code initially. Once that file is created, I comment out the line and bring the schema into my project and generate a dataset object from it. (Did you know you can do that in vs2003 by right clicking on the xsd and selecting the mysterious “run custom tool”?)

Many people are still unaware of this feature and do what comes naturally, which is to point directly to the database for desiging a report. This is one of the causes of the dreadful “please logon” message we get at runtime when trying to view a report. (Another one, I discovered was passing a dataview to the report’s datasource instead of a datatable and apparently passing a dataset can do this too.)

Here is a PDF from the Crystal Reports .NET DevCenter on the Business Objects site that explains how to build reports from ADO.NET.

Also, here is an article by Susan Harkins that I found for someone that explains how to create an XSD file from Access.



Posted from BLInk!

Kate Gregory quotes from dotNetRocks

Just listened to the awesome Kate Gregory’s recent DotNetRocks show. Here are f a few funny quotes from the show.

“Typing is so 2002” (re: intellisense)

“I am a device for converting caffeine into code”  (re: soda for breakfast)

“Be scared of Enterprise Services” Why? Becuase MS’s recommendation is don’t use it unless you really really need it!

“If you believe that there is a little guy in your computer who kind of runs around and carries things around for you, you’re going to have a much better time in my course.”

Posted from BLInk!

DotNetRocks: Ted, Mark and guess who?

This from Carl’s blog:

Speaking of DNR, you’re not going to believe how awesome this week’s show is (it will be online by Wed. morning). It started as a Java discussion with Mark Pollack and Ted Neward, and then Ted invited Don Box to join us, and I basically sat back and let the three of them talk for 2 freaking hours! The fur was flying a couple times, and the discussion was great! I added what I could to it, but I was really outclassed by these guys. Mere mortals should study this discussion in great detail. Lots of good stuff. I’ll post it’s availability here, and of course you can subscribe to the podcast feeds to automatically download it.

Posted from BLInk!

NYC .NET Jobs

Resumes should be sent to jobs@strategic-match.com. Also, please visit our site www.strategic-match.com for information about us or to see our other openings.

JOB # PCI – 002: .NET Senior Developer / Architect (New York City, NY):

Full-time Direct Hire

Requirements:

In-depth problem solving capabilities as well as the ability to identify tasks and provide time estimates

A Bachelor of Science or Master’s degree in Computer Science or Computer Engineering or equivalent experience

7 + years of development experience

3+ years as an architect/lead developer/technical mentor on large-scale,

3+ OO projects

Multi-platform development experience using both Windows and Unix

(Solaris/HP-UX/Linux)

Expert in C#/.NET Framework

Excellent written and verbal communication skills and are able to work with Wall Street traders, senior management and top-notch developers

An interest in travel and exciting, challenging work

JOB #PCI – 004: Senior Excel VBA Developer(New York, NY): Full-time Direct Hire

Requirements:

A person with 2+ years of experience

Strong knowledge of Excel and Excel VBA

Strong knowledge of Sybase (v11 + ) and T-SQL

Knowledge of Fixed Income would be an asset

Knowledge of C++ would be an asset

Have experience with some or all of the following Technologies: .NET, Java, J2EE, C/C++, SQL, Oracle, Web Technologies (ASP.NET/JSP/DHTML/XML), TIBCO.

Have the ability to pick up new technologies quickly, because they are, after all, merely new spins on concepts you already understand.

Have excellent written and verbal communication skills and are able to work with Wall Street traders, senior management and top-notch developers

Have interest in travel and exciting, challenging work

Posted from BLInk!

I love my user group!!!

I love talking to the Vermont.NET user group! These are my friends. It feels a lot more like teaching and sharing than presenting at a conference with a strict time limit to a group of people that may or may not like your presentation style and may or may not understand that you are there because you really truly want to help them understand something that is hard.

Tonight I spent 3 hours doing my WSE talk which is really two talks. Since our  meeting is 6-9, this wasn’t a bad thing. They were warned! Though not everyone lasted the whole 3 hours – I’d say 1/2.

First it is a whole presentation explaining the tools of security. The second part is an introduction to WSE2 along with explanation of some of the problems you may run into when you are not working in a perfect text book setting. It’s a little hard doing it at night since I myself started to get a little tired, but I kept checking, they wanted the brain dump so that’s what they got. It was really really fun and I know I really helped a good bunch of the people there. I got to answer every question that anyone had (it was a small group) which is something that you just cannot afford to do in a conference talk. There were a few questions that went a little deeper than my knowledge goes, but I answered with what I could and we decided to dig up the rest another time.

Even if I have to do it as two separate talks, I always want to do these together.

Posted from BLInk!

Tonight at Vermont.NET – Securing Web Services with WSE2

Last minute reminder on my talk tonight at Vermont.NET
 
Web Service Enhancements 2.0 was released in June. It can look very complicated but does not have to be!! Not only is WSE2.0 a valuable tool for securing web services *TODAY* (as well as implementing a number of the other Web Services specifications) but it is the path to Indigo.
 
This talk will be in two parts tonight. The first part is designed to ensure that we all have a good grasp of the tools of security – what is encryption? what is a digital signature? what is a digital certificate? etc. I’ll also make sure you know what a WS-* Spec is! I found that understanding these things made it possible for me to finally comprehend the articles and books I had been trying to read about WSE. Nobody had ever taken the time to explain these things well enough and I had felt like a bit of a dummy. So I want to explain it to you.
 
The second part of the talk will walk through the key elements of the WSE2 API, how to secure your web services with them and how to use the WSE Settings  tool to click your way to the most critical pieces of securing your messages across the pipe.
 
I have done this talk at the Montreal Visual Studio .NET User Group and at ASPConnections, so it is getting pretty well honed.


Posted from BLInk!