Wednesday, April 22, 2009

How to get Skin directory in DotNetNuke

If you want to keep your skin images or any other type of file that is related to your skin into skin directory, you need to get the path of that skin directory. To resolve the path of your skin directory DotNetNuke provides a property named “SkinPath” which belongs to DotNetNuke.UI.Skins.Skin class. You need to use <%= SkinPath %> to get the path of skin directory.

 

If you stored an image named “nav_back.jpg” in your skin directory and you want to set it as a background of a <td>, your code should be like -

<td style="background-image: url(<%= SkinPath %>nav_back.jpg);">

Friday, April 10, 2009

NetBeans J2ME Project debugging problem : Attaching to localhost:xxxxx Connection refused

After a long time I was working on a J2ME application using NetBeans. Previously that application was built using WTK and I was trying to add those source file in new netbeans project.

Application was compiling properly. But When I was starting debug, it was showing "Attaching to locahost:5999 Connection refused" in "Debugger Console". At first I thought that port is used by some other program or firewall was blocking NetBeans to use that port. But I found that port was not being used or blocked by any other program. Then I carefully examined all of the messages in NetBeans output window and found following message -
com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
The manifest or the application descriptor MUST contain the attribute: MIDlet-1

After some googling I found the way to solve this "com.sun.kvem.midletsuite.InvalidJadException: Reason = 22" exception. When this exception was solved, "Attaching to localhost:xxxxx Connection refused" problem was also solved!!!

Here are the process to solve that InvalidJadException -

From your problematic NetBeans Mobility Project folder open /nbproject/project.properties (default project directory is My Documents\NetBeansProjects) file using any text editor. Search for the property "manifest.midlets". You will find something like - manifest.midlets=MIDlet-1: , , \n
In this manifest.midlets property, midlet name is missing, so NetBeans was giving that error. To solve that exception you need to add your midlet name here. For example, if your midlet name is "HelloMidlet" which is under package "hello" then you need to change the line like -
manifest.midlets=MIDlet-1: HelloMidlet, , hello.HelloMidlet\n

Wednesday, September 10, 2008

SQL Publishing Wizard - A tool to generate database schema and data in Sql Server 2005

I was searching for some functionality to generating database schema with existing data in Sql Server Management Studio Express. But could not find such functionality there. So, I was searching for some tool that can generate database schema with data.

Finally I've found that there is a tool - "SQL Publishing Wizard" comes with Sql Server 2005 express in Visual Studio 2008 installation dvd (I'm not sure about VS 2005). If you install SqlServer2005 express with Visual Studio 2008 installation then you can find this tool in - "C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\1.2\SqlPubWiz.exe". If this is not installed you can download it from - http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

You can also start this tool from Visual Studio. Right click on any Data Connection from Server Explorer and select "Publish to Provider". This will start "SQL Publishing Wizard" for the selected database.