June 27, 2003

Translating RSS with XSLT - Simple!

Simple!RSS - , Real Simple Syndication, is an XML dialect used by bloggers to hold their channels and entries. Other sites use RSS to describe the content on a page or recent articles they have written. XSLT is a language used to transform XML documents into other documents. In this article we will be transforming RSS into HTML. I will demonstrate how pulling and transforming information describing my articles.

Posted by sachauncey at 08:25 PM

Refresh Links

This code snippet can be used to refresh table links in an Access or VB application by looping through the ADO Catalog to find tables, determine if they are linked in the application, and relinking if they are.
1:     Sub RefreshLinks()

2: Dim cat As ADOX.Catalog
3: Dim tbl As ADOX.Table
4: Set cat = New ADOX.Catalog
5: cat.ActiveConnection = CurrentProject.Connection
6: Set tbl = New ADOX.Table
7: For Each tbl In cat.Tables
8: If tbl.Type = "LINK" Then
9: tbl.Properties("Jet OLEDB:Link Provider String")
10: = "MS Access;PWD=Admin;"
11: End If
12: Next
13: End Sub


Posted by sachauncey at 08:04 PM

Loop Thru and Print Images


1:     Option Compare Database

2: Option Explicit
3:
4: Private Sub Command7_Click()
5: Dim MYIMAGE As String
6: Dim CNN As ADODB.Connection
7: Dim RST As New ADODB.Recordset
8: Dim stDocName As String
9:
10: stDocName = "PrintImagesAuto"
11: DoCmd.SelectObject acForm, stDocName, True
12:
13: 'On Error Resume Next
14: Set CNN = CurrentProject.Connection
15: RST.Open "IMAGES", CNN, adOpenDynamic, adLockOptimistic ', adCmdTableDirect
16: RST.MoveFirst
17:
18: Do Until RST.EOF
19: If RST.EOF Then
20: Exit Sub
21: End If
22:
23: MYIMAGE = RST!Folder
24: Me![Image2].Picture = MYIMAGE
25:
26: 'Print this form
27: DoCmd.PrintOut
28:
29:
30: RST.MoveNext
31: Loop
32:
33: CNN.Close
34: ' RST.Close
35: Set CNN = Nothing
36: Set RST = Nothing
37: DoCmd.SelectObject acForm, stDocName, False
38: End Sub


Posted by sachauncey at 06:53 PM

Loop thru all the Tables in a database Without Knowing the Names


1:     loop thru all the tables in a database without knowing the names." 

2:
3:
4: dim oConn, oRSTbl
5:
6: '
7: ' Open the object that we'll need.
8: '
9: set oConn = CreateObject ("ADODB.Connection")
10: set oRSTbl = CreateObject ("ADODB.Recordset")
11: oConn.open "DSN=MyDSN;
12:
13: '
14: ' Pass 20 to the function for Tables.
15: '
16: set oRSTbl = oConn.OpenSchema (20)
17:
18: '
19: ' Fly down our schema and generate a message
20: ' for each table we find
21: '
22: while not oRSTbl.eof
23: MsgBox "Table is [" + oRSTbl ("TABLE_NAME") + "]"
24: oRSTbl.movenext
25: wend
26:
27:


Posted by sachauncey at 06:41 PM

Loop Thru All the Sites on an IIS Server


1:     loop thru all the sites on an IIS server." 

2: Dim IISOBJ, WebSite
3: Set IISOBJ = GetObject("IIS://Localhost/W3SVC")
4: For each WebSite in IISOBJ
5: if (WebSite.Class = "IIsWebServer") then
6: MsgBox WebSite.ServerComment + "("_
7: + GetPath (WebSite) + ")"
8: end if
9: Next
10:
11: Function GetPath (WebSite)
12: Dim Root, NewADSPath, Path
13: Set Root = GetObject(WebSite.ADSPath & "/ROOT")
14: GetPath = lcase(Root.Path)
15: End Function
16:
17:


Posted by sachauncey at 06:39 PM

Learn to Consume RSS Feed - ASP.Net Code Included

Learn to Consume RSS Using DevX's New Content Feeds "Now it's easier than ever to find out what's new at DevX. This article will show you two simple ways of pulling links to new DevX content into your own sites using an XML standard called RSS . Get started with one of our feeds today, or use these techniques to pull in feeds from all over the Net." by A. Russell Jones, Executive Editor June 23, 2003

Posted by sachauncey at 05:32 PM

June 25, 2003

June 21, 2003

RSS: Promise and Peril

RSS: Promise and Peril "The smart people already knew this, but I’m still just picking up on it: RSS has huge business potential. Here is a laundry list of a few things you could (and I think should) use it for. There are big-money implications. But there’s at least one big obstacle too." by Tim Bray

Posted by sachauncey at 02:40 PM

June 20, 2003

Access Jobs

Just Access Jobs JustTechJobs.com is a jobsite for IT professionals, but with a twist. Rather than being a single monolithic jobsite that contains hundreds of thousands of postings for every discipline within the technology industry, JustTechJobs.com is your gateway to a collection of technology niched jobsites.

Posted by sachauncey at 08:45 PM

Links

MS Access Resources

Posted by sachauncey at 08:43 PM

Peter's Software

Peter's Software Samples, Tools etc (Shrinker - resizing forms based on screen resolution)

Posted by sachauncey at 08:41 PM

June 16, 2003

NL Medicine - DTD Format Standard

LIBRARY CREATES FORMAT STANDARDS Document Type Definitions (DTDs), from the National Library of Medicine --simpler exchange of electronic journal articles among publishers, libraries, and archives. ..

Posted by sachauncey at 02:07 PM

June 12, 2003

Excerpt First Entry, List Next 4

First title to also display intro text (stuff that i put into "entry body") + link "read on" that takes to single entry page. And then the other 4 titles but without intro sentences. Use two MTEntries loops like so:CODE
1:       

2: [CODE]<$MTEntries ... lastn="1"$>
3: <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a> <br>
4: <MTEntryExcerpt>
5: </MTEntries>
6: <$MTEntries ... lastn="4" offset="1"$>
7: <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a> <br>
8: </MTEntries> [/CODE]


The first one is going to include the entry excerpt (or whatever you want it to
do) and the next one is using the offest attribute to skip over the entry that
was displayed in the first loop.
Posted by sachauncey at 12:50 PM

June 10, 2003

Adding Relationships to DataTables

Adding Relationships to DataTables We know that a DataSet is an in-memory replica of database. It can contain multiple DataTables just like a database. In addition you can also set relationship between the DataTables and navigate through the relationship. This article shows you how. By: Bipin Joshi Email : webmaster@dotnetbips.com
1:     using System;

2: using System.Data;
3: using System.Data.SqlClient;
4:
5: namespace ADONETSamples
6: {
7: class Sample
8: {
9: static void Main(string[] args)
10: {
11: //declare connection,datadapter and dataset
12: SqlConnection cnn;
13: SqlDataAdapter da;
14: DataSet ds;
15:
16: //create connection
17: cnn=new SqlConnection("connection_string_here");
18: da=new SqlDataAdapter();
19: ds=new DataSet();
20:
21: //set selectcommand property
22: da.SelectCommand=
23: new SqlCommand("select * from customers",cnn);
24:
25: //populate the dataset
26: da.Fill(ds,"customers");
27: da.SelectCommand.CommandText=
28: "select * from orders";
29: da.Fill(ds,"orders");
30:
31: //declare relationship
32: DataRelation rel=
33: new DataRelation("custorders",
34: ds.Tables[0].Columns["customerid"],
35: ds.Tables[1].Columns["customerid"]);
36: ds.Relations.Add(rel);
37:
38: //display values of customers datatable
39: foreach(DataRow r in ds.Tables[0].Rows)
40: {
41: Console.WriteLine(r["customerid"]);
42: DataRow[] childrows=r.GetChildRows("custorders");
43: foreach(DataRow cr in childrows)
44: {
45: Console.WriteLine("\t" + cr["orderid"]);
46: }
47: }
48: }
49: }
50: }
51:
52:


Posted by sachauncey at 01:51 AM

June 09, 2003

ASP.Net Tools

Rich Content Rotator allows ASP.NET developers to easily implement the most common types of DHTML content rotation: news scrollers, product slideshows, feature highlights, stock tickers, and random content rotation.
Form Builder .Net FormBuilder.NET is a 100% web-based product that allows anyone to create ASP.NET forms visually using Internet Explorer 6.
Show My Code Cut and Paste your code and it will be prepared for display on an HTML page -- great for code sharing and managing you code 'snippets'


Please send tool suggestions in the comments!


Posted by sachauncey at 03:04 PM