Web2py Database Connection with SQL Server and Trusted Connection?

59 views
Skip to first unread message

Constanza Lagunas

unread,
Jul 13, 2019, 3:01:35 AM7/13/19
to web2py-users
Hi! I'm a beginner on web programming and just started with web2py. So I was wondering how should I connect from my web2py site to a SQL Server Database? I need to mention that my connection string uses Trusted_Connection=True, so I don't connect with user nor password.
I'm sorry! It may be really simple but I just didn't get a working solution on the web.

Thanks!

Massimo Di Pierro

unread,
Jul 20, 2019, 1:27:56 AM7/20/19
to web2py-users
Hello Costanza,

sorry for the late reply. I am not too familiar with mssql but your database should be identified by a connection string also known as DSN

In web2py you would use:

db = DAL('mssql://...')

where ... is your dsn string.
Reply all
Reply to author
Forward
0 new messages