On Wed, Jul 15, 2009 at 4:18 AM, pho...@gmail.com <pho...@gmail.com> wrote:

>
> Hi, all
>
> i have used the command 'manage.py inspectdb' to generate code of
> models.
> then i want to use the code to create dbtable in mysql, and i got
> errormessage:
>    Traceback (most recent call last):
> [snip]
>  File "C:\Python25\Lib\site-packages\MySQLdb\connections.py", line
> 35, in defau
> lterrorhandler
>    raise errorclass, errorvalue
> _mysql_exceptions.ProgrammingError: (1064, "You have an error in your
> SQL syntax
> ; check the manual that corresponds to your MySQL server version for
> the right s
> yntax to use near '-127) NULL,\n    `MGSYXS` numeric(126, -127) NULL,
> \n    `MGSY
> KC` numeric(126, -127' at line 17")
>
> the code of models:
>    mgsyxs = models.DecimalField(decimal_places=-127, null=True,
> max_digits=126, db_column='MGSYXS', blank=True) # Field name made
> lowercase.
>
> i appreciate for your suggestion.


decimal_places=-127 doesn't look right, I don't think that value should be
lower than 0.  What is this field defined as in your original (Oracle?) db?
It's possible that inspectdb is not working properly for whatever it you
have in your original DB.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to