How to retrieve results from mysql_info() function

Questions and answers regarding general SQL and backend databases

How to retrieve results from mysql_info() function

Postby rioba » Mon Sep 10, 2012 11:26 am

In MySQL, after a LOAD DATA INFILE statement I would like to run a
Code: Select all
mysql_info()
function to get information on the records inserted, skipped, and so on. How can I do this inside Servoy? Thanks for your help
rioba
 
Posts: 242
Joined: Mon Aug 08, 2005 4:26 pm

Re: How to retrieve results from mysql_info() function

Postby lvostinar » Mon Sep 10, 2012 11:47 am

rioba wrote:In MySQL, after a LOAD DATA INFILE statement I would like to run a
Code: Select all
mysql_info()
function to get information on the records inserted, skipped, and so on. How can I do this inside Servoy? Thanks for your help


Use raw sql plugin ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: How to retrieve results from mysql_info() function

Postby rioba » Mon Sep 10, 2012 12:08 pm

Yes, I thought of that, but I don't know how to extract the information. The Servoy function returns a boolean, and I normally use raw sql plugin to manipulate the db but not to get back information inside Servoy. That's the problem.
rioba
 
Posts: 242
Joined: Mon Aug 08, 2005 4:26 pm

Re: How to retrieve results from mysql_info() function

Postby lvostinar » Mon Sep 10, 2012 12:15 pm

rioba wrote:Yes, I thought of that, but I don't know how to extract the information. The Servoy function returns a boolean, and I normally use raw sql plugin to manipulate the db but not to get back information inside Servoy. That's the problem.


Can't you use a stored procedure to retrieve that information ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: How to retrieve results from mysql_info() function

Postby rioba » Wed Sep 12, 2012 8:50 am

Thank you for your tip. I have done a lot of tests using a stored procedure as you suggested, but with no success. Either I am doing something wrong or maybe a MySQL C API function such as mysql_info() doesn't work inside a stored procedure. Some time ago I had a similar problem not being able to show inside Servoy the warnings generated by a MySQL statement and I could not solve it using straight SQL functions or statements. But i don't remember the workaround, if any, I used then.
rioba
 
Posts: 242
Joined: Mon Aug 08, 2005 4:26 pm

Re: How to retrieve results from mysql_info() function

Postby lvostinar » Wed Sep 12, 2012 9:02 am

rioba wrote:Thank you for your tip. I have done a lot of tests using a stored procedure as you suggested, but with no success. Either I am doing something wrong or maybe a MySQL C API function such as mysql_info() doesn't work inside a stored procedure. Some time ago I had a similar problem not being able to show inside Servoy the warnings generated by a MySQL statement and I could not solve it using straight SQL functions or statements. But i don't remember the workaround, if any, I used then.


You could open a case/feature request so that we can investigate how to solve this.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 6 guests