Hi all,

In db.py,  I successful create a connect to MSSQL and create a new
table in "mydb" database like below.

db.py
msdb = DAL('mssql://user:passwd@sqlserver/mydb')
msdb.define_table('test1',Field('firstname'),Field('surname'))

Now in mydb, I got two tables "test" which already exists and "test1"
which web2py just created.

In default.py, I tried to return all the tables in "mydb"

def mssql():
    crud = Crud(msdb)
    # Try to return all the tables
    a = crud.tables()
    return dict(a=a)

But in view mssql.html {{=a}}
only the "test1" shows.

So my questions is that, If I want to query/update the "test" table
which not created by web2py, how should I do?
Do I need import pyodbc and create a connect and query again?  Many
thanks.

Reply via email to