what data base r u using

On Tue, 04 Dec 2001 Matt Penner wrote :
> OK, I dont' believe that autocommit is the problem.  I 
> tried running your query
> in a regular Access database but I received an error 
> "Malformed GUID. in query
> expression '{d '2001-12-03'}'."
> 
> I'm not sure why you're not getting a SQLException but 
> try it in your own
> database.  Are you sure that your query is right?  I'm 
> not a database expert
> but I've never seen a query formed with a "{d" like 
> this.
> 
> Hope this helps,
> Matt
> 
> 
> Quoting Isidoros Vacropoulos <[EMAIL PROTECTED]>:
> 
> > i'm not sure but i think i've read someplace that not 
> all drivers
> > support changing the commit mode. Some may not even 
> have 2 commit
> > modes
> > but only one which is autocommit...
> >
> > Isidoros
> >
> .
> .
> .
> > -----Original Message-----
> > From: Nandish Angadi [mailto:[EMAIL PROTECTED]]
> > Sent: 03 December 2001 11:17
> > To: [EMAIL PROTECTED]
> > Subject: JDBC
> >
> >
> > Hi all,
> >          I have a table with four data/time fields in 
> the table. I
> > want
> > to insert a row and i am using the sql command as 
> "insert into
> > table_name values ({d \'yyyy-mm-dd\'},{d 
> \'yyyy-mm-dd\'},{d
> > \'yyyy-mm-dd\'},{d \'yyyy-mm-dd\'})".I do not get a 
> compile error nor
> > a
> > runntime error, but when i check the database row is 
> not inserted.
> >
> > here is the code
> >
> >         Connection con;
> > // creates a reference for Connection Class
> >                 Statement st=null;
> > // creates a reference for Statement Class
> >                 ResultSet rs;
> >                 try
> >                         {
> >
> > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> > // define the Driver
> >                                 con =
> > DriverManager.getConnection("jdbc:odbc:"+dns,dnsName,
> dnsPassword); //
> > Get the Connection
> >                                 st = 
> con.createStatement();
> > // Create Statement
> >                                 String sql = "Insert 
> into
> > Budget_Project_Definition values (12,{d 
> \'2001-12-03\'})";
> >
> >                         int result = 
> st.executeUpdate(sql);
> >                         System.out.println("A    
> "+result);
> >                         con.setAutoCommit(true);
> >                         }catch(Exception e){
> >                         e.printStackTrace();
> >                                 }
> >
> > Thanks in advance
> >
> > Nandish
> >
> 
> ________________________________________________________-
> ___________________
> To unsubscribe, send email to [EMAIL PROTECTED] and 
> include in the body
> of the message "signoff SERVLET-INTEREST".
> 
> Archives: http://archives.java.sun.com/archives/servlet--
> interest.html
> Resources: http://java.sun.com/products/servlet/external-
> -resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.ht-
> ml
> 
 


___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to