Comment on Tutorial - JSP Example to connect to MS SQL database and retrieve records By Abinaya



Comment Added by : Rahul

Comment Added at : 2012-08-18 12:26:39

Comment on Tutorial : JSP Example to connect to MS SQL database and retrieve records By Abinaya
PLZ HELP ME WITH THIS.. WHEN I RUN THE FILE ON APACHE SERVER, AN EXCEPTION IS GENERATED. THE EXCEPTION IS:
Exception: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
PLEASE., PLEASE DO HELP ME...

<%@ page import="java.sql.*" %>
<%
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:SystemDsn;user=sa;password=.");
Statement ps=con.createStatement();

ResultSet rs=ps.executeQuery("select * from link_sql");
out.println("<table>");

while(rs.next())
{
out.println("<tr><td>");
out.println("<a href='"+rs.getString("link")+"'>"+rs.getString("anchor")+"</a>");
out.println("</td></tr>");
}
out.println("</table>");
}
catch(Exception e)
{
out.println("Exception: "+e.getMessage());
}

%>


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I have downloaded all the files
SMSClient.j

View Tutorial          By: Sanjay at 2010-06-29 04:48:16

2. This is an excerpt from Java Complete Reference.Ju
View Tutorial          By: Guest at 2010-03-25 01:36:57

3. Cool it help me a lot
View Tutorial          By: urdu sms at 2009-10-06 12:16:20

4. Thanks it worked. Just remember to restart apache
View Tutorial          By: Raj at 2014-02-08 08:42:26

5. thankssss to prograem
View Tutorial          By: maha at 2010-05-21 05:14:36

6. very good site for qustion answer. I just spellbo
View Tutorial          By: Anindya Mitra at 2012-04-22 16:28:42

7. Hai everyone,I am getting error like *** time out
View Tutorial          By: Prasad at 2011-08-30 06:28:44

8. I want a code to receive message from GSM modem us
View Tutorial          By: Mayur at 2011-04-05 00:00:05

9. hi ..

for second code which impleme

View Tutorial          By: Eng at 2009-02-21 03:53:29

10. nice...cleared this example....
View Tutorial          By: Waqas Mughal at 2010-03-13 21:21:46