<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>> On Tue, Apr 7, 2009 at 9:25 AM, Markus Neteler <neteler@osgeo.org> wrote:<br>> > On Tue, Apr 7, 2009 at 12:47 AM, Jhon Ortiz <eljhonjhon@hotmail.com> wrote:<br>> >> Hi all,<br>> >><br>> >> I'm trying to create a new vector (points) map from a mysql database table<br>> >><br>> >> v.in.db --overwrite table=data_wells driver=mysql<br>> >> database="host=localhost,dbname=Eoceno" x=Este y=Norte z=Salinity_Index<br>> >> key=Cat output=Pozos<br>> >><br>> >> but I get this error:<br>> >><br>> >> WARNING: MySQL driver: column 'Salinity_Index', type 246 is not supported<br>> ><br>> ><br>> > I have searched that and found<br>> ><br>> > grep 246 /usr/include/mysql/mysql_com.h<br>> > MYSQL_TYPE_NEWDECIMAL=246,<br>> ><br>> > I suspect that this change is sufficient to solve the problem:<br>> > --- db/drivers/mysql/describe.c (revision 36267)<br>> > +++ db/drivers/mysql/describe.c (working copy)<br>> > @@ -177,6 +177,7 @@<br>> > break;<br>> ><br>> > case MYSQL_TYPE_DECIMAL:<br>> > + case MYSQL_TYPE_NEWDECIMAL:<br>> > *sqltype = DB_SQL_TYPE_DECIMAL;<br>> > break;<br>> <br>> Ah, I already suggested it in 2007 to someone else but there was<br>> no feedback:<br>> https://wald.intevation.org/tracker/index.php?func=detail&aid=524&group_id=21&atid=204<br>> <br>> > Do you have a possibility to compile and test?<br>> <br>> Please :) Or someone else with a running Mysql installation.<br>> <br><br>Thanks for your help Markus,<br><br>I change in<br><br>db/drivers/mysql/describe.c<br><br>case MYSQL_TYPE_DECIMAL:<br>case MYSQL_TYPE_NEWDECIMAL:<br> *sqltype = DB_SQL_TYPE_DECIMAL;<br> break;<br><br>and then compiled..<br><br>Now, when I tried<br><br>v.in.db --overwrite table=data_wells driver=mysql database="host=localhost,dbname=Eoceno" <br>x=Este y=Norte z=Salinity_Index key=Cat output=Pozos3<br><br>The error is:<br><br>Writing features...<br>ERROR: x/y/z column must be integer or double<br><br>I change the decimal type by double in mi MySQL database table and now is working..<br><br>Thanks again,<br><br><br>John Ortiz<br>Biostratigraphic Group - ICP<br>Bogotá - Colombia<br><br><br><br /><hr />¿Quieres estar al día de la últimas novedades? <a href='http://newsletters.msn.com/ ' target='_new'>¡Apúntate gratis aquí! </a></body>
</html>