On Wednesday 09 August 2006 18:14, you wrote: > the date/time/datetime types in SQLAlchemy accept datetime objects, > not strings; formatting should not be an issue on the SA side.
Well, i gave a Date column a string and it was accepted. Anyway, as i said, i am not doing this as part of SA, it is the formencode library which i extend. The problem is understanding which field caused the problem from the error message i get from SA. If the user enters something and you just pass it along to the database it is difficult to tell the user what was his mistake. > > On Aug 9, 2006, at 6:28 AM, Tzahi Fadida wrote: > > Hi, > > I am trying to convert automatically a list of columns definition > > to a formencode schema. String,Integer,Float,Numeric,Binary > > were easy to convert, i.e. just the String(40), not empty, > > precision, length > > etc. However, i don't know what to use for: > > DateTime,Date,Time,Boolean . I am guessing SQLAlchemy does not > > check the format of these and just lets the engine throw the errors, > > though unhelpful they may be. > > Is there anything i can use to decide if a string is indeed at an > > acceptable > > DateTime,Date,Time,Boolean format to databases? > > They don't have to be on the spot, since it is the automatic side > > of things. > > For specifics i create custom validators, i.e., i am looking for > > one, to know > > if a DateTime is indeed a DateTime format that the database will > > accept, > > etc... > > 10x. > > > > -- > > Regards, > > Tzahi. > > -- > > Tzahi Fadida > > Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info > > WARNING TO SPAMMERS: see at > > http://members.lycos.co.uk/my2nis/spamwarning.html > > > > ---------------------------------------------------------------------- > > --- > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your > > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Sqlalchemy-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users -- Regards, Tzahi. -- Tzahi Fadida Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info WARNING TO SPAMMERS: see at http://members.lycos.co.uk/my2nis/spamwarning.html ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

