On May 30, 2012, at 3:56 PM, Lukasz Szybalski wrote:
>
>
> On May 30, 2:35 pm, Michael Bayer <
mike...@zzzcomputing.com> wrote:
>> On May 30, 2012, at 3:24 PM, Lukasz Szybalski wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On May 30, 1:03 pm, Michael Bayer <
mike...@zzzcomputing.com> wrote:
>>>> the default schema name is determined by:
>>
>>>> SELECT default_schema_name FROM
>>>> sys.database_principals
>>>> WHERE name = (SELECT user_name())
>>>> AND type = 'S'
>>
>>>> for some reason on your system it's coming up as "MyDatabase". You'd want to fix that so that it comes up with "dbo".
>>
>>> I can't.
>>> The database was design for a specific application and I cannot make
>>> changes to it structure, other then my records.
>>
>>> Is there a _somevalue that stores this in my engine, so that I can
>>> overwrite it? or is it automatically get pulled every time I do a
>>> "autoload=True"?
>>
>> then you'd need to put "schema='dbo'" into each of your Table objects. the autoload should work fine with that.
>>
>>
>
> Where would I put the "schema='db'"?
>
> somewhere inside this statement ?
> image_table = sqlalchemy.Table('image', metadata, autoload=True) ?
>
> or?
>
>
>
> [SQL Server]Login failed. The login is from an untrusted domain and
> cannot be used with Windows authentication.
if you're already using a different username that solves the problem, stick with that.
using "schema" can make things more complicated so don't use it if you don't have to.