[Gambas-user] MySQL Component Error ?

nigel at ...38... nigel at ...38...
Tue Jun 7 11:52:59 CEST 2005


Budi,

with regard to point 2, querying mysql with a single query, the syntax I believe you should use is:

select version(), database();

But as you state there does seem to be an issue with gambas not clearing the old value in between the statements. I will find time to have a look, but as you might see from my lack of recent involvement in the project, my real work has been pressing.  As a work around, try the single syntax above.

Cheers 

Nigel

> Message date : Jun 06 2005, 12:00 PM
> From : "BUDI ARIEF GUSANDI" <budi.a.gusandi at ...626...>
> To : gambas-user at lists.sourceforge.net
> Copy to : 
> Subject : Re: [Gambas-user] MySQL Component Error ?
> 
> Nigel,
> 
> Yes, i have tried the two selects within mysql shell. Here is the point :
> 1. When i execute the two selects one by one. I've got the correct result.
> 
> mysql> select version();
> +-----------+
> | version() |
> +-----------+
> | 4.0.18    |
> +-----------+
> 1 row in set (0.00 sec)
> 
> mysql> select database();
> +------------+
> | database() |
> +------------+
> | test       |
> +------------+
> 1 row in set (0.00 sec)
> 
> 2. When i execute both together, it gave me error. I cant figure it out 
> why...
> 
> mysql> select database()
>     -> select version();
> ERROR 1064: You have an error in your SQL syntax.  Check the manual that 
> corresponds to your MySQL server version for the right syntax to use 
> near 'select version()' at line 2
> 
> 3. As point number one above works, so i try to execute both queries one 
> by one in gambas (not all the select queries in the same time). But the 
> result is totally different with what i got in mysqlshell.
> i wrote this :      "select version();"  -->i execute-->column name = 
> version() and data returned "4.0.18".  so this is correct.
> i clear the query text.
> i wrote again:   "select database();"  -->i execute-->column name = 
> database() and data returned "4.0.18".  so this is still incorrect.
> Note :  i run this in gambas DB manager and via code as well.
> 
> It's supposed to give the same result as point number 1 above right ?
> 
> Budi
> 
> nigel at ...38... wrote:
> 
> >Budi,
> >
> >I know this is an obvious thing, but have you tried the two selects just within mysql, on  the command interface? 
> >
> >Nigel
> >
> >
> >  
> >
> >>Message date : Jun 06 2005, 04:05 AM
> >>>From : "BUDI ARIEF GUSANDI" <budi.a.gusandi at ...626...>
> >>To : gambas-user at lists.sourceforge.net
> >>Copy to : 
> >>Subject : [Gambas-user] MySQL Component Error ?
> >>
> >>Hi...
> >>
> >>I dont know what's wrong the MySQL or TableView component ?
> >>Try execute this query :
> >>
> >>SELECT Version()
> >>the result will be 4.0.x
> >>SELECT Database()
> >>the result is the same as select version above. Not the current actual 
> >>selected Database.
> >>any can help ? You can execute it via gambas-db-manager sql query.
> >>
> >>Regards,
> >>Budi
> >>
> >>
> >>    
> >>
> >
> >  
> >
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
> a projector? How fast can you ride your desk chair down the office luge track?
> If you want to score the big prize, get to know the little guy.  
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm





More information about the User mailing list