As it doesn't seem possible to change self._uri in SQLDB,
I solved the problem by adding an extra keyword argument (which travels to 
SQLDB):

    Database_Name = r'mssql://NKCV2
*    MSSQL_Login = ';UID=MY_SQL_LOGIN;PWD=MY_PASSWORD'
*    My_DB = DAL ( Database_Name, folder = folder, *MSSQL_Login = MSSQL_Login* )

cheers,
Stef

On 05-03-2011 00:34, Stef Mientki wrote:
> hello,
>
>
> With the DAL I created tables in an MSSQL database, which I can access as 
> long as I login as the
> same user.
>
> I created the table with a windows login on my own machine, like this
>     Database_Name = r'mssql://NKCV2'
>     My_DB = DAL ( Database_Name, folder = folder )
>
> Now I'm on anther machine, I can not use the windows login, so I use a MSSQL 
> login
> ( I found the syntax by trial and error)
> *    Database_Name = r'mssql://NKCV2;UID=MY_SQL_LOGIN;PWD=MY_PASSWORD'
> *    My_DB = DAL ( Database_Name, folder = folder )
>
> The login works, I can contact de database,
> with the DAL is trying to create new tables (which I'm not allowed, and as 
> far as know, I don't
> need to because they are already there)
>   File "P:\Python26\lib\site-packages\gluon\sql.py", line 1100, in <lambda>
>     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL 
> Server]CREATE TABLE
> permission denied in database 'NKCV2'. (262) (SQLExecDirectW)")
>
> Could this be caused, by the DAL creating other filenames to store the table 
> information ?
> Any suggestions to solve this problem ?
>
> thanks,
> Stef Mientki
>

Reply via email to