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
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Java program to get location meta data from an image
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
Archived Comments
1. hi could u tell me how to download a file using se
View Tutorial By: akki at 2013-02-19 05:52:03
2. What is meant by source code portability?
View Tutorial By: sathihs at 2012-11-02 11:16:57
3. Hi ,learn a new thing about These Transient and Vo
View Tutorial By: LakshmiNarayana Golla at 2010-07-28 02:49:48
4. Hi,
I tried use this code:
<
View Tutorial By: Yanosh at 2009-07-16 05:19:38
5. thanks you're such an angel :) thanks for solving
View Tutorial By: Tanzeela Ali at 2013-04-01 07:42:08
6. Thanks for the tips.
I hesitated to
View Tutorial By: Dick at 2011-10-09 15:21:50
7. yes 29 you are correct! 27's example is prone to a
View Tutorial By: sameendra at 2011-07-24 11:55:54
8. Cant undrstand clearly
View Tutorial By: rathika at 2014-06-09 11:02:16
9. This is a bad example, it does not check if the al
View Tutorial By: Erik at 2011-02-12 07:16:20
10. Sorry, I can't understand what is really apply and
View Tutorial By: Ejita at 2012-02-01 05:38:09