Updated: 17.05.2003; 11:52:05.
Nielsen's Weblog
.NET [use your Context dude]
        

16 April 2003

ODP.NET is back,

Last year this bug drove me insane for awhile, with the new release of ODP.NET, they actually fixed this problem. A big smile on my face 5 min. ago as I tested this. Thank you Oracle, my excuse to dive into DataAdapter again.

This means I can start up my 2nd best all time favorite developer tool once again....come to think of it, I never got around to configure my jdbc driver in weblogic 7.0 due to this bug and 8.1 is out now!!!

Aah again it's late, goodnight

"Patience is the best remedy for every trouble."
  --Titus Maccius Plautus


11:40:04 PM    comment []

I must be having a bad hairday, but the weather is fine.

I have been debugging a Visual basic 6.0 ActiveX component all day.

The VB IDE crashed 9 times today, 'God' why did you invent this language, this tedious crappy environment. You are a nice guy, but today you got under my skin BIG TIME.

I have a strange habit checking the space weather in the morning and then again before bedtime.

I don't know why I care, but I've been doing this for 3 years now. It's not important to me, it's not like I am going there soon or planing an intergalactic trip out in space where the only answer is 42, it's just something I do...it might come in handy one sunny day :-)

 


7:29:00 PM    comment []

I don't know how many times I wanted my cache objects to be flexible. Often you end up writing tons of cache objects, 9 out of 10 times model after the database layout <grin> and when it's time to use them, it's tedious to iterate over them.
Now since I am looking into System.Xml; these days I stumbled over the IXPathNavigable interface which has 1 method that returns the XPathNavigator object. With the XPathNavigator object I can use XPath expressions. So what if my cacheobject had the ability to serialize it self to memory passing it on the the XPathDocument, thereby loading my cacheobject as valid xml and then call CreateNavigator. This would actually give me the opportunity to use xpath on my cache object. hmm


some code to illustrate this:

[XmlRootAttribute(ElementName = "vstudio",IsNullable = false)]
public class xmldoc : IXPathNavigable
{

 [System.Xml.Serialization.XmlArrayAttribute(ElementName = "namespaces", IsNullable = false)]
 [System.Xml.Serialization.XmlArrayItemAttribute("class", Type = typeof(System.String), IsNullable = false)]
 public ArrayList framework;
 [System.Xml.Serialization.XmlElementAttribute("msdn")]  
 public string msdn;
 [System.Xml.Serialization.XmlElementAttribute("date")]  
 public string date;
 [System.Xml.Serialization.XmlElementAttribute("price")]  
 public int price;

 public XPathNavigator CreateNavigator()
 {
  MemoryStream memStream = new MemoryStream();
  XmlSerializer serializer = new XmlSerializer(typeof(xmldoc));
  TextWriter writer = new StreamWriter(memStream);
   
  this.framework = new ArrayList();
  for(int i = 0; i < 3; i++)
   this.framework.Add("IXPathNavigable" + i.ToString());
  this.msdn="msdn";
  this.date="16-04-2003";
  this.price=2999;
  serializer.Serialize(writer, this);
  memStream.Seek(0,0);
  XPathDocument doc = new XPathDocument(memStream);   
  writer.Close();
  memStream.Close();
  return doc.CreateNavigator();
 }
}

now on the client side you do this:

xmldoc x = new xmldoc();
XPathNavigator nav = x.CreateNavigator();
XPathNodeIterator itr = nav.Select("/vstudio/namespaces/class");
while(itr.MoveNext())
{
    System.Diagnostics.Trace.WriteLine(itr.Current.Name + ": " + itr.Current.Value);
}

I know it's far from perfect, but there are some cool potentials here...

"Java is high performance. By high performance we mean adequate. By adequate we mean slow."
- Mr. Bunny

wow I am tired, Goodnight.

 


12:33:13 AM    comment []

© Copyright 2003 Allan Nielsen.
 
April 2003
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Mar   May


Click here to visit the Radio UserLand website.

Subscribe to "Nielsen's Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.