you dont mention what the error message says.
you only mention the code that is creating the error.
this only gives me half of the story
I have no way of knowing how to fix an error without knowing what the error is.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.