mohsin sheikh

Greenhorn
+ Follow
since Mar 28, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mohsin sheikh

I am getting the error:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

I have included all jar file.I have checked that TCP/IP is enabled in my system.My system is a standalone computer which is not connected to any network.Please help me in resolving the problem
Please tell me about the jar files to be included in Classpath and from where i can download that?
Hi,
The error of TCP/IP has been removed.Now I am getting an error of:
No Suitable Driver for jdbc:sqlserver://localhost;databaseName=attendance","sa",""

Which type of Driver it is talking about.Can you explain..I have included sqljdbc.jar in the libraries but still i am getting the above error.
Can you tell me about driver.
Thanks
Hi paul,

Can you tell me how to progress.
can you give me a code to connect.I am not using ODBC
Hi Ujwal thanks for your help.
I have included sqljdbc.jar in the path but that doesn't work.
I change the code to:

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con=DriverManager.getConnection("jdbc:sqlserver://localhost;databaseName=attendance","sa","");

Now it is giving an error:
Unable to Initialize Data Source (com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect)

Please help.

Is there any other way to connect to SQL Server 2000?
Hi,
I am building a project in struts.I am using Sql Server 2000 database for backend.
I am getting an exception of"No Suitable Driver" when i am trying to connect to database.
I have successfully build the User DSN say "attendance" using ODBC.
I have used following driver to connect to database:

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
DriverManager.getConnection("jdbc:odbc:attendance","sa","");

Please tell me where i am going wrong.
Please guide me to connect to database.

ThankYou.
Hi,
I have a XSLT page which take some value from database.the fields are:
topicid,topicdescription,subtopicid,subtopicdescription.and passed it through the below anchor tab to a function "selectTopic"

<a href="javascript:selectTopic({$topicId},'{$topicDescription/JavaScriptFormat}',{@subtypeid},'{Description/JavaScriptFormat}');">


function selectTopic(aTopicId, aTopicDescription, aSubTopicId, aSubtopicDescription) {
document.AdvancedSearchForm.courseTypeId.value=aTopicId;
document.AdvancedSearchForm.topicText.value = aTopicDescription;
if (aSubTopicId) {
document.AdvancedSearchForm.courseSubTypeId.value=aSubTopicId;
document.AdvancedSearchForm.subTopicText.value = aSubtopicDescription;
}
document.AdvancedSearchForm.submit();
}

The form gets submit and show the above four values in next page.
The problem is that:when the subtopicdesription field has some special character like "-" then on next page some garbagevalue appears.
Eg:


English
IT � ITS Process
IT � Technical
Products & Services
Project Management
English is the "Topic" and rest is the subtopic.When i click (suppose )" IT � Technical".The on next page it shows

Topic: English > Sub-Topic: IT �€“ ITS Process

The above problem does not come in FireFox but occur in InternetExplorer.
Please give me the solution ASAP
Hi
Lets take a code:

public abc()
{
List str=new List();
syncronized(str)
{
stmt 1..............
stmt 2..........
more code here....
}
}

My question is that..what is synchronized in above code
1)The List
2)Block of code in syncronized(str)()

Please give me more detail
I am developing a project as Task Tracking System.One of the entities used in my project are Client and Task.So i build the bean for Client and Task.
The Client Bean consists:Client Id,ClientName,ClientStatus.The Task bean consists of TaskId,TaskName,Description,CreateDate,TaskStatus etc.The Relation between client and task is of one to many relation.So I include Clientid in Task Bean.Now i want to show the list of task with their client as

ClientName ClientStatus TaskName CreateDate TaskStatus....

For this i am getting the above data from the database .Now i want to set the bean properties after getting the resultset from the database.Now the problem is that which bean property should i set.If i set the Task property,i will do as follows....
Task task=new task();
task.setTaskName(rs.getString(1))
task.setClentId(rs.setClientId(rs.getInt(2))....etc

Now how will i set the property for ClientName and Client Status properties.
And i want the total records in a bean so that i can print the bean value using get method on JSP.So how should i set the bean value and store that in ArrayList so that i can print all the information.Please resolve the above problem and also new ideas to solve the above problem in another way is most welcome.If you can provide some code then it will be very useful to me.But any way i will stick to setting bean properties.
Thanks in advance
I am developing a project as Task Tracking System.One of the entities used in my project are Client and Task.So i build the bean for Client and Task.
The Client Bean consists:Client Id,ClientName,ClientStatus.The Task bean consists of TaskId,TaskName,Description,CreateDate,TaskStatus etc.The Relation between client and task is of one to many relation.So I include Clientid in Task Bean.Now i want to show the list of task with their client as

ClientName ClientStatus TaskName CreateDate TaskStatus....

For this i am getting the above data from the database .Now i want to set the bean properties after getting the resultset from the database.Now the problem is that which bean property should i set.If i set the Task property,i will do as follows....
Task task=new task();
task.setTaskName(rs.getString(1))
task.setClentId(rs.setClientId(rs.getInt(2))....etc

Now how will i set the property for ClientName and Client Status properties.
And i want the total records in a bean so that i can print the bean value using get method on JSP.So how should i set the bean value and store that in ArrayList so that i can print all the information.Please resolve the above problem and also new ideas to solve the above problem in another way is most welcome.If you can provide some code then it will be very useful to me.But any way i will stick to setting bean properties.
Thanks in advance
15 years ago
I am developing a project as Task Tracking System.One of the entities used in my project are Client and Task.So i build the bean for Client and Task.
The Client Bean consists:Client Id,ClientName,ClientStatus.The Task bean consists of TaskId,TaskName,Description,CreateDate,TaskStatus etc.The Relation between client and task is of one to many relation.So I include Clientid in Task Bean.Now i want to show the list of task with their client as

ClientName ClientStatus TaskName CreateDate TaskStatus....

For this i am getting the above data from the database .Now i want to set the bean properties after getting the resultset from the database.Now the problem is that which bean property should i set.If i taset the Task property,i will do as follows....
Task task=new task();
task.setTaskName(rs.getString(1))
task.setClentId(rs.setClientId(rs.getInt(2))....etc

Now how will i set the property for ClientName and Client Status properties.
And i want the total records in a bean so that i can print the bean value using get method on JSP.So how should i set the bean value and store that in ArrayList so that i can print all the information.Please resolve the above problem and also new ideas to solve the above problem in anothe way is most welcome.But any way i will stick to setting bean properties.
Thanks in advance
16 years ago
I am developing a project as Task Tracking System.One of the entities used in my project are Client and Task.So i build the bean for Client and Task.
The Client Bean consists:Client Id,ClientName,ClientStatus.The Task bean consists of TaskId,TaskName,Description,CreateDate,TaskStatus etc.The Relation between client and task is of one to many relation.So I include Clientid in Task Bean.Now i want to show the list of task with their client as

ClientName ClientStatus TaskName CreateDate TaskStatus....

For this i am getting the above data from the database .Now i want to set the bean properties after getting the resultset from the database.Now the problem is that which bean property should i set.If i taset the Task property,i will do as follows....
Task task=new task();
task.setTaskName(rs.getString(1))
task.setClentId(rs.setClientId(rs.getInt(2))....etc

Now how will i set the property for ClientName and Client Status properties.
And i want the total records in a bean so that i can print the bean value using get method on JSP.So how should i set the bean value and store that in ArrayList so that i can print all the information.Please resolve the above problem and also new ideas to solve the above problem in anothe way is most welcome.But any way i will stick to setting bean properties.
Thanks in advance
16 years ago
Thanks for your reply but i didn't get you.Can you explain it in more detail.
If possible,also give me some code related to my problem.Thanks in advance
16 years ago
I am developing a project as Task Tracking System.One of the entities used in my project are Client and Task.So i build the form bean for Client and Task.
The Client form Bean consists:Client Id,ClientName.The Task form bean consists of TaskId,TaskName,Description,CreateDate,Status etc.The Relation between client and task is of one to many relation.Now i want to show the list of task with their client.For this i am taking an arraylist and from the database i am picking the resultset containing taskid,taskname,createdate,clientid,clientname.Now the problem is that how should i set the bean value and store that in ArrayList so that i can print all the information.How should i create the relation.The relation is one to many.should i build another bean which extend task and add some repeated attributes like clientid, clientname etc(from client).Please give me suggestion on my problem(what should i do).

Please give me the suggestion of how to solve the above problem.I will be very grateful to you.
16 years ago