Dear All,

     maybe i've found a bug.
     in my connection string i specify use_unicode=True

     when the system construct the kw dictionary in the
     SQLObject._create method in main.py, the column names are
     unicode, therefore the keywords in kw are also unicode.

     i've made already the modification; it works for me, thus i
     cannot make full test.

     if you need the code (main.py) i can send you for further process
     ...

Tuesday, June 6, 2006, 2:28:18 PM, you wrote:

IH> Dear Lutz,

IH>      yes, but this is not the case - i guess
IH>      here is the class definition:

IH>      class ts_project(SQLObject):
IH>         class sqlmeta:
IH>                 table="ts_project"
IH>                 idName="proj_id"
IH>                 fromDatabase=True

IH>      and this is the mysql describe result (it is a cvs sorry):
IH> "Field","Type","Null","Key","Default","Extra"
IH> "proj_id","int(11)","","PRI","","auto_increment"
IH> "title","varchar(200)","","","",""
IH> "client_id","int(11)","","","0",""
IH> "description","varchar(255)","YES","","",""
IH> "start_date","date","","","1970-01-01",""
IH> "deadline","date","","","0000-00-00",""
IH> "http_link","varchar(127)","YES","","",""
IH> 
"proj_status","enum('Pending','Started','Suspended','Complete')","","","Pending",""
IH> "proj_leader","varchar(32)","","","",""
     
IH> as you see the proj_id is the primary index and it is an
IH> auto_increment field

IH> Tuesday, June 6, 2006, 2:21:25 PM, you wrote:

LS>> Hello Ivan,

LS>> as I remeber if you use a string type column as id its up to
LS>> you to insert a new unique id.

LS>> some thing like this:
LS>> new_user=ts_user= (username="myunique_name")

LS>> because SQLObect has no idea how your id logic works.

LS>> have fun

LS>> Regards
LS>> Lutz



LS>> On Tue, 6 Jun 2006 13:40:17 +0200
LS>> Ivan Horvath <[EMAIL PROTECTED]> wrote:

>>> Dear sqlobject-discuss,
>>> 
>>>   finally i was able to download the latest version from svn.
>>>   the column definition is solved.
>>>   but i have problem to insert a new row in a table.
>>> 
>>>   ts_project(title="project1")
>>>   command fails with
>>> Traceback (most recent call last):
>>>   File "D:\alco\python\admin\timeshit.py", line 58, in ?
>>>     ts_project(title=u"ivan project")
>>>   File
>>> "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\declarative.py",
>>> line 94, in _wrapper
>>>     return fn(self, *args, **kwargs)
>>>   File
>>> "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\main.py",
>>> line 1212, in __init__
>>>     self._create(id, **kw)
>>>   File
>>> "c:\python24\lib\site-packages\sqlobject-trunk\sqlobject\main.py",
>>> line 1238, in _create
>>>     self.set(**kw)
>>> TypeError: set() keywords must be strings
>>> 
>>>   exception.
>>>   what does it mean?
>>> 
>>> -- 
>>> Best regards,
>>>  Ivan Horvath
>>>  Chief Programmer
>>> 
>>>  Alcatel ISD
>>>  PMS 2000 Product Team
>>> 
>>>  H-1116, Budapest
>>>  Kondorfa u. 10.
>>>  Tel.: +36 1 209 9546
>>>  Fax.: +36 1 209 9599
>>>  Mobil: +36 30 257 0235
>>>  VOIP: +49 511 676 478010
>>>  mailto:[EMAIL PROTECTED]
>>> 
>>> Anyone who has never made a mistake has never tried anything new.
>>> 
>>> /Albert Einstein/ 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> sqlobject-discuss mailing list
>>> sqlobject-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


LS>> _______________________________________________
LS>> sqlobject-discuss mailing list
LS>> sqlobject-discuss@lists.sourceforge.net
LS>> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss






-- 
Best regards,
 Ivan Horvath
 Chief Programmer

 Alcatel ISD
 PMS 2000 Product Team

 H-1116, Budapest
 Kondorfa u. 10.
 Tel.: +36 1 209 9546
 Fax.: +36 1 209 9599
 Mobil: +36 30 257 0235
 VOIP: +49 511 676 478010
 mailto:[EMAIL PROTECTED]

Anyone who has never made a mistake has never tried anything new.

/Albert Einstein/ 



_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to