-
How can I Initialize getJdbcTemplate()?
Task- Just need to select table data (one column also ok) from table1 and return as java.util.List
------------------------------
integration-dao.xml
-----------------------------
Code:
<bean id="cListDAO "
class="com…..CListDAO "
p:dataSource-ref="dataSource"
p:sqlLoader-ref="sqlLoader" />
<bean id="sqlLoader"
class="com.asi.integration.common.business.dao.sql .SQLLoader" />
-------------------------
integration-datasource.xml
-------------------------
Code:
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close"
p:driverClass="${my.jdbc.driverClassName}"
p:jdbcUrl="${my.jdbc.url}"
p:user="${my.jdbc.username}"
password="${my.jdbc.password}"
p:initialPoolSize="${my.jdbc.pool.init.size}"
p:maxPoolSize="${my.jdbc.pool.max.size}"
preferredTestQuery="${my.jdbc.preferredTestQuery }"
p:idleConnectionTestPeriod="${my.jdbc.idleConnecti onTestPeriod}"/>
-------------------------------
integration-hibernate.xml
--------------------------------
Code:
<!-- Hibernate SessionFactory for datasource -->
<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean"
p:dataSource-ref="dataSource">
<!-- tried by giving this also--><!--<property name="dataSource" ref="dataSource"></property> -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
${my.hibernate.dialect}
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.query.substitutions">
true 1, false 0
</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
-------------------------
SQLConstants.java
-------------------------
Code:
public class SQLConstants {
public static final String PACKAGE = ClassUtils.getPackageName(SQLConstants.class);
public static final String C_NUMBERS_LIST =
"CNumberList.sql";
/**
* Private constructor to prevent instantiation.
*/
private SQLConstants() {
super();
}
}
-------------------------
CNumberList.sql
----------------------
Code:
select * FROM table1
----------------------------
CListDAO.java
-----------------------
Code:
public class CListDAO extends JdbcDAO {
public List claims() {
List li = getJdbcTemplate().queryForList(
this.loadQuery(SQLConstants.PACKAGE,
SQLConstants.C_NUMBERS_LIST));
Iterator iter = li.iterator();
System.out.println("I want ===>>"+li.size());
while(iter.hasNext()){
System.out.println("I want->>>>"+iter.next());
}
return li;
}
--------------------------
JdbcDAO.java
----------------------------------
Code:
public class JdbcDAO extends JdbcDaoSupport implements IJdbcDAO {
private SQLLoader _sqlLoader;
….
protected String loadQuery(String packageName, String sqlName) {
return _sqlLoader.loadQuery(packageName, sqlName);
}
….
}
----------------------------------------
I am getting NullPointerException at
Code:
“ getJdbcTemplate().queryForList(
this.loadQuery(SQLConstants.PACKAGE,
SQLConstants.C_NUMBERS_LIST));
, I observed getJdbcTemplate() Is comming as null.
How can i create instance of JdbcTemplate here ?
Do I need to use sessionfactory , if yes , how can I wire up ?
Please tell me what I missed above.
Thanks in advance.
==========================
Error:
===========================
Code:
java.lang.NullPointerException
at com…….CListDAO.getRecords(ClaimsListDAO.java:32)
at com……..runScheduledJob(GenerationScheduledJob.java :52)
at com….common.jobs.AbstractScheduledJob.execute(Abst ractScheduledJob.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.util.MethodInvoker.invoke(Meth odInvoker.java:276)
at org.springframework.scheduling.quartz.MethodInvoki ngJobDetailFactoryBean$MethodInvokingJob.executeIn ternal(MethodInvokingJobDetailFactoryBean.java:260 )
at org.springframework.scheduling.quartz.QuartzJobBea n.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:2 02)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:529)
-
Re: How can I Initialize getJdbcTemplate()?
Can any one help me in solving my problem ?
-
Re: How can I Initialize getJdbcTemplate()?
If you had used [CODE] tags probably someone might be interested in reading your code...
-
Re: How can I Initialize getJdbcTemplate()?
Thanks for reply jcaccia.
I modified my post with code tags, Can you help me in solving my problem?
Please let me know if you need more details from my end.
-
Re: How can I Initialize getJdbcTemplate()?
Quote:
Originally Posted by
java_dev
I modified my post with code tags, Can you help me in solving my problem?
The point of the code tags is to preserve the formatting. If the code is unformatted, they won't help.
I am always doing that which I cannot do, in order that I may learn how to do it...
P. Picasso
-
Re: How can I Initialize getJdbcTemplate()?
Yes, I can understand, that the reason I changed as per your suggestion. I need help in solving my problem.
Please help me.
-
Re: How can I Initialize getJdbcTemplate()?
Quote:
Originally Posted by
java_dev
Yes, I can understand, that the reason I changed as per your suggestion.
<sigh> Your code is not formatted, so putting it in code tags is pointless. jcaccia was asking for formatted (readable) code.
Quote:
I need help in solving my problem.
Perhaps jcaccia might be more inclined to help if the code was formatted and readable...?
Programs must be written for people to read, and only incidentally for machines to execute...
H. Abelson and G. Sussman
-
Re: How can I Initialize getJdbcTemplate()?
are you planning on providing your own transaction management?
-
Re: How can I Initialize getJdbcTemplate()?
Thanks for reply Deliverance!
No, I am not planning to providing any transaction management.
Result List of claims() I will give to a job.
I am also updating my recent try….
I modified my Integration-dao.xml as follows. Still I am getting same exception, do I need to change any thing on CListDAO.java ?
Code:
<bean id="claimNumberListDAO"
class="com.asi.integration.cc.jobs.activity.ClaimNumberListDAO"
p:dataSource-ref="dataSource" p:sqlLoader-ref="sqlLoader"
p:jdbcTemplate-ref="jdbcTemplate"/>
<!-- The db JdbcTemplate class -->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
-
Re: How can I Initialize getJdbcTemplate()?
It's hard to say, I've never done it that way. I have always provided some level of transaction management independent of hibernate.
Have you tested everything with an in memory database?
Code:
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="org.hsqldb.jdbcDriver" />
<property name="jdbcUrl" value="jdbc:hsqldb:mem:test" />
<property name="user" value="sa" />
<property name="password" value="" />
</bean>
then add a session manager as a bean, and in your code, wire the session factory to one of your DAOs and try
Code:
SessionFactoryUtils.getSession(sessionFactory, true);
-
Re: How can I Initialize getJdbcTemplate()?
yes, I tested my “datasource connection” by hard coding sql statement. It is working.
I am able to proceed further with above exception, I am facing another exception
I tried using interface as follows
ICListDAO.java
Code:
public interface IListDAO extends IJdbcDAO {
void setCListDAO(CListDAO cListDAO);
}
IJdbcDAO.java
Code:
public interface IJdbcDAO {
}
CGenerationScheduledJob.java
Code:
public class CGenerationScheduledJob extends
AbstractScheduledJob implements ICListDAO {
private CListDAO cListDAO;
public void setCListDAO(CListDAO cListDAO) {
this.cListDAO = cListDAO;
}
public void runScheduledJob() {
try {
cListDAO.claims();
}
Integration-scheduler.xml
Code:
<bean id="activityGenerationJob"
class="com….jobs.activity.ClaimCenterActivityGenerationScheduledJob"
p:hostNameUtils-ref="hostNameUtils" p:cListDAO-ref="cListDAO"/>
Integration-dao.xml
Code:
<bean id="cListDAO"
class="com..jobs.activity.CListDAO"
p:dataSource-ref="dataSource" p:sqlLoader-ref="sqlLoader"
p:jdbcTemplate-ref="jdbcTemplate">
</bean>
<!-- The db JdbcTemplate class -->
<bean id="jdbcTemplate"
class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
I am getting exception, please help me.
Error:
Code:
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activityGenerationJob' defined in ServletContext resource [/WEB-INF/Integration-scheduler.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.....cc.jobs.activity.CListDAO] for property 'cListDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com....cc.jobs.activity.CListDAO] for property 'cListDAO': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
-
Re: How can I Initialize getJdbcTemplate()?
Quote:
Originally Posted by
java_dev
Error:
Code:
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activityGenerationJob' defined in ServletContext resource [/WEB-INF/Integration-scheduler.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.....cc.jobs.activity.CListDAO] for property 'cListDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com....cc.jobs.activity.CListDAO] for property 'cListDAO': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
This is due to the fact that Spring is dealing with your beans in terms of interface so that it can use the Java proxy mechanism to return you a decorated class, while making it look the same to you who is using it. I've ran into these problems when trying to wire or pass a reference to a concrete type rather than interface.
Take a look at what CListDAO if you are using @Autowired , and make sure that you pass the interface to your activityGenerationJob
-
Re: How can I Initialize getJdbcTemplate()?
Thanks , I resolved this issue, can you please tell what is this design/concept name ? I want to read more on this by googling.
-
Re: How can I Initialize getJdbcTemplate()?
And also can you please give the best place(url) from where I can read about spring with help of example(like java tutorial)?
-
Re: How can I Initialize getJdbcTemplate()?
The Spring documentation is a great resource and at some point, you will benefit greatly from reading through the entire thing
http://static.springsource.org/sprin...nce/index.html
The design concept you were looking for is Java proxying.
http://java.sun.com/j2se/1.4.2/docs/...ion/proxy.html
-
Re: How can I Initialize getJdbcTemplate()?
Hi Deliverance, I am facing one issue, I injected FieldValue in spring config file as follows,
x-shedular.xml
Code:
<bean id="fieldValue" class="com….FieldValue"/>
<bean id="activityGenerationJob"
class="com….CActivityGenerationScheduledJob"
p:fieldValue-ref="fieldValue"
/>
CActivityGenerationScheduledJob.java
Code:
When I tired to override two columns
fieldValue[0].setIdentifier("0");
fieldValue[0].setName("FirstDate");
fieldValue[0].setValue(updated_FirstDate);
fieldValue[0].setIdentifier("1");
fieldValue[0].setName("SecondDate");
fieldValue[0].setValue(updated_ SecondDate);
cAPIClient.addActivityWithOverride(somenumber, “some value”,fieldValue);
HTML Code:
Constructor Summary
1. FieldValue()
2. FieldValue(java.lang.String identifier, java.lang.String name, java.lang.String value)
I can't set size as bellow , becose it is a final value
Code:
if(fieldValue.length ==0){
fieldValue.length = 5;
}
addActivityWithOverride() method 3 parameter is type of FieldValue, When I tried with HashMap, type cast exception is comming.
but my first name and value is overriding/replacing by second value, here how can I initialize the FieldValue with value more than 1 so that I can generate Activity With Override.
Please help.
-
Re: How can I Initialize getJdbcTemplate()?
And with good reason.
length is a property that primitive array types provide, as a convenience for polling the size of the array. It can only be read from.
Code:
FieldValue [] fieldValues = new FieldValue[5];
System.out.println(fieldValues.length);
-
Re: How can I Initialize getJdbcTemplate()?
Deliverance, When I initialized as
try1: with out removing FieldValue bean injection in config file
Code:
fieldValue = new FieldValue[5];
try2: after removing FieldValue bean injection in config file
Code:
FieldValue fieldValue = new FieldValue[5];
For Both tries, I am getting null pointer exception at
Code:
fieldValue[0].setIdentifier("0");
please help.
-
Re: How can I Initialize getJdbcTemplate()?
Code:
And with good reason.
length is a property that primitive array types provide, as a convenience for polling the size of the array. It can only be read from.
Code:
FieldValue [] fieldValues = new FieldValue[5];
System.out.println(fieldValues.length);
here spring is injecting the FieldValue bean, do we need new keyword again ? all I want is how to assign size. please correct me if am wrong.
-
Re: How can I Initialize getJdbcTemplate()?
In the constructor, or @PostConstruct annotation you should provide initialization of this array. This assumes you know the size you need in advance, and it is fixed.
You have only provided a container to hold these objects, but it does not contain the reference objects yet, so you still have to do
Code:
fieldValues[0] = new FieldValue();
-
Re: How can I Initialize getJdbcTemplate()?
When I initialized with 5 as bellow
Code:
fieldValue[5] = new FieldValue();
I am getting
Code:
java.lang.ArrayIndexOutOfBoundsException: 5
how to resolve this?
-
Re: How can I Initialize getJdbcTemplate()?
-
Re: How can I Initialize getJdbcTemplate()?
Quote:
Originally Posted by
jcaccia
new FieldValue() creates one instance of FieldValue. At the left of the assignment operator you have an array of 5 objects of type FieldValue.
Incorrect.
Left hand side is fieldValues at index 5 , which is out of range, since arrays start at 0.
you have 0, 1, 2, 3, 4 (which is 5 elements).
-
Re: How can I Initialize getJdbcTemplate()?
You are right, sorry, got distracted in the office while replying to the post and ended writing that stupid reply...
-
Re: How can I Initialize getJdbcTemplate()?
Hi jcaccia and Deliverance, thanks for you concerns on my issue.
Can you please let me know how can I solve my above issue? I am struck....
Thanks in advance!
-Dev
-
Re: How can I Initialize getJdbcTemplate()?
Quote:
Originally Posted by
Deliverance
Left hand side is fieldValues at index 5 , which is out of range, since arrays start at 0.
you have 0, 1, 2, 3, 4 (which is 5 elements).
^ that answers it.
-
Re: How can I Initialize getJdbcTemplate()?
I want to initialize to more than one so that I can append two columns to override (please refer my #16 post)
When I tried as follows
Code:
fieldValue[0] = new FieldValue();
I am getting following exception at
Code:
fieldValue[1].setName("SecondDate");
fieldValue[1].setValue(updated_ SecondDate);
Exception:
Code:
java.lang.ArrayIndexOutOfBoundsException: 1
Please help.
-
Re: How can I Initialize getJdbcTemplate()?
Refer to my post #20.
The array capacity has to be instantiated or given to you (assuming you know this in advance).
Is this your implementation of the class? Can you switch this to LinkedList<FieldValue> instead that is wired to you? It's unclear what you are doing or plan to do , but an array class that has to be dynamically created for me isn't an ideal candidate to be wired up by Spring.
You have two things you must do:
1) Instantiate the array
2) Instantiate the objects, and provide the reference object to the desired index.
It's hard to give you more info without knowing what/why you are doing it this way, and whether or not you manage the code behind FieldValue.
-
Re: How can I Initialize getJdbcTemplate()?
Excelent Deliverance, I am able to resolve with your above inputs. Thanks
-
Re: How can I Initialize getJdbcTemplate()?
Hi,
I want to write JUnit test cases for my job.
CActivityGenerationScheduledJob.java
Code:
public void setICListDAO(ICNumberListDAO cListDAO) {
this.cListDAO = cListDAO;
}
public void runScheduledJob() {
List result_list = cListDAO.getAllCPublicIDs();
.
.
.
}
ICNumberListDAO.java
Code:
public interface ICNumberListDAO extends IJdbcDAO {
List getAllCPublicIDs();
// other methods
}
CCCListDAO.java
Code:
public class CCCListDAO extends JdbcDAO implements ICNumberListDAO {
public List getAllCPublicIDs() {
List result_list=null ;
try{
result_list = getJdbcTemplate().queryForList(
this.loadQuery(SQLConstants.PACKAGE,
SQLConstants.C_LIST));
} catch (Exception bse) {
logError("Error in querying.", bse);
}
return result_list;
}
}
CActivityGenerationScheduledJobTestCase.java
Code:
public class CActivityGenerationScheduledJobTestCase extends
AbstractTestCase {
public void testRunScheduledJob() {
cActivityGenerationScheduledJob.setICListDAO(cListDAO);
cActivityGenerationScheduledJob.setICAPIClient(iCAPIClient);
try {
cActivityGenerationScheduledJob.runScheduledJob();
} catch (Exception e) {
logError("Error running runScheduledJob.", e);
fail();
}
}
when I called runScheduledJob() from CActivityGenerationScheduledJobTestCase class I am getting following exception. Please tell me the best solution for this.
(I have observed CCCListDAO class is coming as null)
Error:
HTML Code:
2009-10-26 06:21:58,772 ERROR Error in Generating Activity.
java.lang.NullPointerException
at com……CActivityGenerationScheduledJob.runScheduledJob(CActivityGenerationScheduledJob.java:61)
at com……CActivityGenerationScheduledJobTestCase.testRunScheduledJob(CActivityGenerationScheduledJobTestCase.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
- Dev
-
Re: How can I Initialize getJdbcTemplate()?
Have you annotated your JUnit test class one way or another to tell it to load the application context that it needs to wire the beans that you plan to use for testing. I have a feeling that your job bean is probably null at this point.
Code:
@RunWith (SpringJUnit4ClassRunner.class)
@ContextConfiguration (locations={"/application-context.xml"})
assuming that you have an 'application-context.xml' in the same project, otherwise you have to use
Code:
classpath*:out-of-scope-context.xml
note that these names application-context.xml and out-of-scope-context.xml need to match your contexts :)
-
Re: How can I Initialize getJdbcTemplate()?
I am using JDK 1.4.x
Code:
@RunWith (SpringJUnit4ClassRunner.class)
@ContextConfiguration (locations={"/application-context.xml"})
annotation is not allowing. What I need to do with out changing JDK version?
Thanks in advance.
-
Re: How can I Initialize getJdbcTemplate()?
:) Ok, so in this case I guess you would have to create your own application context inside of each unit test.
something like this
Code:
AbstractApplicationContext context = new ClassPathXmlApplicationContext("application-context.xml");
then from there, you can request things by bean id by default.
Code:
MyCustomBean myBean = (MyCustomBean)context.getBean("myBeanId");
and then invoke that way.
-
Re: How can I Initialize getJdbcTemplate()?
CGenerationScheduledJobTestCase.java
Code:
public void testRunScheduledJob() {
AbstractApplicationContext context = new
ClassPathXmlApplicationContext("????");
.
.
}
WEB-INF\Integration-dao.xml
Code:
.
.
<bean id="cListDAO" class="com…..cc.business.dao.CCCListDAO">
</bean>
.
.
WEB-INF/Integration-webapp.xml
Code:
<beans>
<context:property-placeholder
location="classpath:jdbc.properties,
classpath:com/././././mail.properties" />
<import resource="/Integration-dao.xml" />
<import resource="/Integration-datasource.xml" />
</beans>
WEB-INF\web.xml
Code:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/Integration-webapp.xml</param-value>
</context-param>
Above is the xml mapping in my project.
Here I want object of cListDAO using getBean() method.
To achieve this what I need to give for ClassPathXmlApplicationContext(“????”)
Thanks
-
Re: How can I Initialize getJdbcTemplate()?
So since the entry point of this web application is through servlet API context initialized, the web application context is good enough since it is importing the other contexts that you may require.
Code:
public void testRunScheduledJob() {
AbstractApplicationContext context = new
ClassPathXmlApplicationContext("Integration-webapp.xml);
.
.
}
That should find it that way, then you can use the getBean methods as i showed you before.
-
Re: How can I Initialize getJdbcTemplate()?
but "Integration-webapp.xml" is also not in classpath
it is in WEB-INF folder. I tried but file not found exception is comming. I belive loading is happening using web.xml.
Code:
WEB-INF/Integration-webapp.xml
Please help.
-
Re: How can I Initialize getJdbcTemplate()?
Quote:
Originally Posted by
java_dev
but "Integration-webapp.xml" is also not in classpath
it is in WEB-INF folder. I tried but file not found exception is comming. I belive loading is happening using web.xml.
Code:
WEB-INF/Integration-webapp.xml
Please help.
well the only problem here is a file lookup.
create another context under say src/test/resources
for unit tests which does what integration-webapp does then. This is usually the preferred way to do 'unit testing' and not 'integration testing' where you use another datasource (in memory database, etc).
-
Re: How can I Initialize getJdbcTemplate()?
Currently I am working on more priority work! Please give me some time to reply.
Deliverance, i posted new request/thread on webservices. Can you please help me on this.
Thread Link:
---------------
http://www.codeguru.com/forum/showth...18#post1894318
Thanks In advance.