March 2008 Entries

msxml:script rant

There are some things that you just can't do with the native implementation of xsl. One alternative is to use the msxml:script block. The problem I am running into is the different implementations of the msxml:script in MSXML and System.Xml.Xsl . In MSXML vbscript is supported while System.Xml.Xsl does not support vbscript. System.Xml.Xsl supports C#,VB.Net, JScript, java, and other languages. The documentation is "XSLT Stylesheet Scripting Using <msxsl:script>" So if your xsl sheets were designed ......

SQL Proc temp tables and TableAdapter

I'm not much of a web design guy but I have to do it once in a while. I needed to display some information on a web page that's in SQL. I like to call stored procs on the SQL server so it's easier for me to modify the logic if needed. Anyway the stored proc uses a bunch of temp tables and returns one of them. When I tried to use the tableadapter config wizard in VS2005 the wizard failed for the temp table. Apparently the wizard could not get the temp table metadata. To work around this put SET FMTONLY ......

SQL 2008 SSMS Intellisense

One of the big timesaving tools that I have been missing is T-SQL intellisense in SQL Server Manangement Studio. Supposedly it was to be included in SQL 2005 but didn't make the cut. However intellisense has been included in the SQL 2008 Feb CTP release. One thing I noted when using it is that there is limited (no?) intellisense support for connecting to SQL 2000 databases. The tests I have done will work with SQL 2005 and SQL 2008 instances. There are 3rd party products out there that provide SQL ......

VB FTP Session Class Using FtpWebRequest

Sub Main() Dim ftp As New FtpSession Dim ftpRetrieveDir As String = "ftp://ftp.domain.com/inbox" ftp.ftpUser = "user" ftp.ftpPwd = "pwd" Dim ftpRetrieveList As String() ftpRetrieveList = ftp.RetrieveFtpDirectory(ft... Dim ftpFileName As String For Each ftpFileName In ftpRetrieveList If ftpFileName.Length > 0 Then ftp.RetrieveFtpFile(ftpRetr... & "/" & ftpFileName, "C:\temp\" & ftpFileName) End If Next End Sub Public Class FtpSession Public ftpUser As String Public ftpPwd ......

FTPWebRequest URI and IE

I needed to create a FTP application to send and retrieve files from a FTP site. I had been using a ftp command file to do it but sometimes the FTP server would be down and the ftp command file wouldn't throw an error. The ftpwebrequest class was introduced in the .Net 2.0 Framework. There are earlier (and other) ftp implementations using the System.Net.Sockets class. Often when a user logs into a FTP site the session is transferred to a user directory. When the ftp url is typed into IE or windows ......