yes - there are two things you are talking about here, Carlo - How do I connect to the DB server so it will listen to me? That you have answered with pyodbc.connect();
And what will you say to it? --- Simply, with web2py your choices are literally two, but practically one: - you can write all the DB2 SQL commands yourself directly from within web2py: db.executesql('my commands'); This is OK if you are doing one or two special tests to see if you're on DB2, and issue special commands, but if you write an app this way you will not have all the web2py behaviors (e.g. form generation, validation); in other words you will make too much work for yourself. The DAL description for a DB is not that complex, and offers you many advantages. Massimo (I think) would write the basics for you, if you will test. I think this is what you want / need. It's not too much work. Have a look at gluon/sql.py: SQL_DIALECTS to see what we're talking about. Not too bad, really. I think you do want this. Once you have it you will be happy. Regards, Yarko On Sun, Feb 22, 2009 at 2:20 PM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > Even if you use odbc, don't you you still need to generate SQL > statements in the DB2 SQL dialects? > > Massimo > > On Feb 22, 2:01 pm, carlo <syseng...@gmail.com> wrote: > > massimo, I do not need native db2 support I always had access via odbc > > ( I like pyodbc ), I was just wondering how I can have a connection > > through a DSN (very common in windows environment) instead of using > > the usual connection string. I found something in one thread here but > > nothing official in the book. > > As I said in my app I had: > > > > db400=pyodbc.connect("DSN=myAS400;UID=myUID;PWD=myPWD") > > > > I need a DAL equivalent. > > > > Said that, if you need to test a new web2py db2 support, I am > > available as I have a vpn to my client's AS400 . > > > > carlo > > > > On 22 Feb, 17:34, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > We do not have DB2 support but if you are available to run some tests > > > we can have that in a couple of days. > > > I will email you a new sql.py for you to test later today. > > > > > Massimo > > > > > On Feb 22, 9:47 am, carlo <syseng...@gmail.com> wrote: > > > > > > I am going to port an application developed in Karrigell to web2py: > > > > RDBMS was DB2 on as400. > > > > > > In my actual version I connected through DSN and pyodbc this way: > > > > > > db400=pyodbc.connect("DSN=myAS400;UID=myUID;PWD=myPWD") > > > > > > How can I get a DSN connection through SQLDB? thank you > > > > > > carlo > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---