Użytkownik Henning Hraban Ramm napisał:
>> This is a logfile excerpt:
>> "DBQueryException encountered in save(): SQL Server message 207,
>> severity 16, state 1, line 1:
>> Invalid column name 'True'."
>>      
>
> That yould also mean that MSSQL wants "true", "TRUE" or TRUE() or
> whatever.
>    

You were close.
Problem is that pymssql expects that for boolean parameter, its placeholder
to be '%i' not '%s' as Dabo provides:
- this doesn't work:
     execute("""insert into dbo.users (us_is_active, us_name, us_login) 
values (%s, %s, %s)""", (True, "foo", "foo"))
- this does work:
     execute("""insert into dbo.users (us_is_active, us_name, us_login) 
values (%i, %s, %s)""", (True, "foo", "foo"))

The clue is that Dabo doesn't support dynamic placeholders.
As I said before, there is much less problem if bit type is mapped as 
integer.
Only disadvantage is, I must provide default value for column,
otherwise UI layer fails to deal with database layer.
I can live with this.

-- 
Regards
Jacek Kałucki

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to