No error, it is just not doing the insert.... Using msSQL Server, datatype
is varchar with a length of 8000...
The problem is somewhere in the code I think...
thanks
Greg
----- Original Message -----
From: "Scott Stirling" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 11:34 AM
Subject: RE: Memo Insert Again


> What error do you get?
>
> What database are you using?
>
> What's the datatype in the database (is it really a long)?
>
> Have you tried varchar instead of long?
>
> Scott Stirling
> JRun QA
> Macromedia
>
> > -----Original Message-----
> > From: Gregory Price [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 31, 2001 12:00 PM
> > To: JRun-Talk
> > Subject: Memo Insert Again
> >
> >
> > I appreciate all of your help... I finally got the prepared
> > statement down through all your help.. However, it is still
> > choking on a LONG string.  It inserts strings with any kind
> > of character (which was a problem before), but it wont update
> > a string that is very large.  Any suggestions?  I hope I am
> > not abusing the list by making so many posts, but you guys
> > have been my best resource.  Code is below...
> > Thanks, Greg Price
> >
> >
> >
> > <%@ page language="java" import="java.sql.*, java.util.*" %>
> > <% String heading= request.getParameter("heading"); %>
> > <% String entry= request.getParameter("entry"); %>
> >  String sqlQuery = "INSERT INTO news (newsletter_ID,
> > heading, entry)   VALUES (?, ?, ?) ";
> >
> >  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> >  String url="jdbc:odbc:afdallas";
> >  Connection c=DriverManager.getConnection(url, "sa", "");
> >      try {
> >         PreparedStatement pstmt = c.prepareStatement(sqlQuery);
> >
> > pstmt.setInt(1,Integer.parseInt(request.getParameter("newslett
> > er_ID").trim()) );
> >         pstmt.setString(2, heading.trim() );
> >         pstmt.setString(3,  entry.trim() );
> >         pstmt.executeUpdate();
> >         pstmt.close();
> >         c.close();
> >
> >     } catch(Exception exc) {
> > System.out.println("Error: "+exc);
> >     }%>
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to