Notes on Writing T-SQL LDAP Queries Using ADSI OPENQUERY
When you are working with Active Directory on your network, then it can be difficult to get a clear picture for how your particular instance of Active Directory is structured. I’ve been writing T-SQL LDAP queries using ADSI OPENQUERY and have been having fun trying to find where some of the values I’m looking for are stored. (more…)
iTextSharp – Insert an Image to a PDF in C#
In this article I will cover some of the basics of inserting an image into a PDF that you are generating with iTextSharp in either C# or VB.NET. This includes:
- Adding your image programmatically while generating your PDF
- Adjusting your image scaling so it renders nicely in your PDF
- Positioning your image in your PDF
- Example code in C#
- Example code in VB.NET
If you are interested in working with the iTextSharp .NET libraries then have a look at some of the other articles covering iTextSharp I have written on the topic. (more…)
T-SQL – Find Where Table Data is Stored
In this article I will expand on an article I wrote earlier about how to search through all of the columns in each table in your database for a particular piece of information.
In the example in this article I have:
- Modified my previous example query to search through columns of all datatypes rather than just VARCHAR type columns. This is important since often tables will have columns consisting of custom datatypes or possibly even Int value columns depending on your search.
- I’ve changed what is output to be the distinct table name and column names that contain the information you are looking for. You’ll be able to take useful looking results from this overview information and then run detailed queries to find out more.
- Also, I have modified the original query to do an exact match for the data being searched for rather than a LIKE condition. If you would like to change this back to a LIKE condition, then I have highlighted the relevant section in red that you can replace with the LIKE condition example in my previous article.This exact match is useful in particular if you are looking for an identity key value throughout your database such as: show me the user Jim who has an ID of 56 so that I can track down all instances of his account information in our database.
ASP.NET Get the Current Web Page Name
I’m taking a look into some of the basic commands in ASP.NET that you can use to find the name of the Web page that is currently running the script as well as important parts of the URL of the current page. For clarity I’ll review the same commands in both C# and VB.NET.
In both VB.NET and C# you can find the current page name using:
- System.IO.Path.GetFileName
- System.IO.FileInfo
- System.Web.VirtualPathUtility.GetFileName
If you find this article useful, check out some other ASP.NET tips I have written. (more…)
ShowModalDialog Example – How to Save Popup Form Information and Close the Modal Popup Window
In this article I will go through a technique that you can use when working with a modal popup that lets you store form information from your popup to later use with your main Web form.
In earlier articles I have covered some of the general functions and benefits of using the ShowModalDialog function that I will expand on this article. If you have questions about some of the code I’ve used in this article, then please take a look at my earlier articles that might help explain some of the concepts:










