Massimo, I agree with your points, not necessarily 3, but then again, i've
had many years of experience writing sql queries, so i know what can go
wrong, and i know why you might say that to a beginner.
On Friday, October 5, 2012 7:24:40 AM UTC-7, Massimo Di Pierro wrote:
>
> I am not sure about your assignment.
> You can build a simple web2py applications like this:
>
> def index():
> db = DAL('sqlite://mydb.sqlite')
> form = SQLFORM.factory(Field('sql','text'))
> if form.process().accepted:
> try:
> rows = db.executesql(sql)
> db.commit()
> except: db.rollback()
> return dict(page = DIV(DIV(form),DIV(BEAUTIFY(rows))))
>
> it will make a form and allows you to interact with 'sqlite' database
> called 'mydb.sqlite' You can replace the
> 'sqlite://mydb.sqlite' string to interact with any other existing
> database. BBBBUUUUUTTTTT.....
>
> 1) No database follows exactely the SQL99 standard
> 2) web2py was not designed to do this. It was designed NOT to do this.
> 3) web2py was designed so that users NEVER write SQL. Ever. SQL is
> dangerous, unsafe, error prone, database dependent (it is not standard as
> they say in school).
> 4) I am not sure I am understanding your assignment correctly and, in
> fact, I am pretty sure I am not.
>
> Massimo
>
>
>
> On Friday, 5 October 2012 05:04:52 UTC-5, dantuluri jaganadha raju wrote:
>>
>> Hi,
>> I am taking Intro to Data bases course.In that course we are
>> expected to prepare an application about any organization (we selected
>> school) . We have to prepare an user interface such that any one can enter
>> his/her query in SQL99 and retrieve the required data. Does web2py support
>> this feature? If so how can I implement the user interface which takes
>> SQL99 Query as input and retrieve the result.
>>
>> Please suggest me some reading material regarding
>> this.
>> Thank
>> you.
>>
>> Yours sincerely,
>> Raju,
>> IIIT-Hyderabad,
>> Andhra pradesh,
>> India.
>>
>
--