RE: How to return resultset from MySQL Stored Procedure using prepared statement?

2013-03-13 Thread Rick James
ed Procedure using > prepared statement? > > DELIMITER $$ > CREATE PROCEDURE List_IL() > BEGIN > > DECLARE Project_Number_val VARCHAR( 255 ); > DECLARE Temp_List_val VARCHAR(255); > DECLARE Project_List_val VARCHAR(255); > DECLARE FoundCount INT; > DECLARE

Re: stored procedure and random table name -> temp table, merge, prepared statement

2009-12-10 Thread D. Dante Lorenso
yhow, let me know what you think of this strategy for sidestepping the need for prepared statements when working with MyISAM tables passed to stored procedures. -- Dante Regards, Gavin Towey -Original Message----- From: Dante Lorenso [mailto:da...@lorenso.com] Sent: Thursday, December 10, 2009 3:20

RE: stored procedure and random table name -> temp table, merge, prepared statement

2009-12-10 Thread Gavin Towey
To: mysql@lists.mysql.com Subject: stored procedure and random table name -> temp table, merge, prepared statement All, I have a stored procedure that I'm writing where I need to run a lot of queries against a particular table. The name of the table will be a parameter to the stored procedure

stored procedure and random table name -> temp table, merge, prepared statement

2009-12-10 Thread Dante Lorenso
All, I have a stored procedure that I'm writing where I need to run a lot of queries against a particular table. The name of the table will be a parameter to the stored procedure ... example: CALL normalize_data('name_of_table_here'); Since I want to run queries against this table, I don't want

Prepared statement cursors problem.

2008-07-29 Thread Carlos Savoretti
Hi all: I need to set a cursor for doing a SELECT (using the C API) According the documentation I did in order to setup the cursor. --- const unsigned long cursor_type = CURSOR_TYPE_READ_ONLY; if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_CURSOR_TYPE, (void *) &cursor_type)) { g_

Prepared statement cursors problem.

2008-07-29 Thread Carlos Savoretti
Hi all: I need to set a cursor for doing a SELECT (using the C API) According the documentation I did in order to setup the cursor. --- const unsigned long cursor_type = CURSOR_TYPE_READ_ONLY; if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_CURSOR_TYPE, (void *) &cursor_type)) { g_

Prepared Statement, Select and Calls in C/C++ UDF

2006-04-15 Thread Miroslav Nachev
Hi, I want to make "C" User Defined Function where to do some data processing using the parameters and the data in the database and to return some BIGINT result after that. My questions are: Q1. Is it possible to use Prepared Statement, Select and Calls in C/C++ UDF? Q2. If,

C API Prepared Statement Data types with unsigned int

2006-03-29 Thread 古雷
mysql> desc MSGDB_20060330; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | CREATETIME| char(14)| NO | |

Re: prepared statement problems [SOLVED]

2005-08-22 Thread Darrell Cormier
On Monday 22 August 2005 15:30, Darrell Cormier wrote: > > Yes, thank you again. I had just upgraded and tested it about the time I > got this message. The loggin is working fine now. > > Now I get this for the log output: > > /usr/sbin/mysqld-max, Version: 5.0.11-beta-Max-log. started with: >

Re: prepared statement problems

2005-08-22 Thread Darrell Cormier
On Monday 22 August 2005 09:31, Gleb Paharenko wrote: > Hello. > > Use 4.1.13. Logging for prepared statements works as of that version. > See: > http://bugs.mysql.com/bug.php?id=8367 > > > Yes, thank you again. I had just upgraded and tested it about the time I got this message. The loggin

Re: prepared statement problems

2005-08-22 Thread Gleb Paharenko
Hello. Use 4.1.13. Logging for prepared statements works as of that version. See: http://bugs.mysql.com/bug.php?id=8367 050822 17:28:13 122 Connect [EMAIL PROTECTED] on test 122 Prepare [1] select product from lth where

Re: prepared statement problems

2005-08-19 Thread Darrell Cormier
On Thursday 18 August 2005 17:52, Gleb Paharenko wrote: > Hello. > > I've modified your source code, and it works now. Use diff to see the > changes. > Thank you, but I made the changes and I still get no returned data. Below is the contents of the logfile when I run my program. It appears tha

Re: SQL statement generated from prepared statement

2005-08-19 Thread Darrell Cormier
On Thursday 18 August 2005 16:37, Gleb Paharenko wrote: > Hello. > > These links might be helpful: > http://dev.mysql.com/doc/mysql/en/query-log.html > http://dev.mysql.com/doc/mysql/en/debugging-client.html > http://dev.mysql.com/doc/mysql/en/debugging-server.html > > Use a fresh ver

Re: prepared statement problems

2005-08-19 Thread Gleb Paharenko
t;,sizeof("XTEX6")); //bind facility parm_bind[0].buffer_type= MYSQL_TYPE_STRING; parm_bind[0].buffer= (char*)&facility; parm_bind[0].buffer_length= 50; parm_bind[0].is_null= 0; parm_bind[0].length= &str_length[0]; //bind lot parm_bind

Re: SQL statement generated from prepared statement

2005-08-19 Thread Gleb Paharenko
from prepared statements properly. Darrell Cormier <[EMAIL PROTECTED]> wrote: > Is there a way to get MySQL to report the SQL statement it receives from > a prepared statement execution (from a program using the C-API )? I am > wondering what the SQL statement looks like tha

SQL statement generated from prepared statement

2005-08-18 Thread Darrell Cormier
Is there a way to get MySQL to report the SQL statement it receives from a prepared statement execution (from a program using the C-API )? I am wondering what the SQL statement looks like that is being generated from my program to help debug it. Thanks, DC -- Darrell Cormier <[EM

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
Sujay Koduri said the following on 08/18/2005 09:33 AM: hi, you should use strlen() instead of sizeof() to pass the length of input bind parameter, otherwise it will read past the actual parameter and tries to compare with the whole thing which is not intended. str_length[0]= sizeof(facility);

RE: prepared statement problems

2005-08-18 Thread Sujay Koduri
mysql_list Cc: Sujay Koduri Subject: Re: prepared statement problems Sujay Koduri said the following on 08/18/2005 08:48 AM: Send the code if it is still not working. sujay Not sure what you mean by send the code since it is included at the end of this email. However, I have al

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
Sorry, the text of my message did not come through for some reason. I have included it below. DC Sujay Koduri said the following on 08/18/2005 08:48 AM: Send the code if it is still not working. sujay Not sure what you mean by send the code since it is included at the end of this email

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
uffer_length= sizeof(facility); parm_bind[0].is_null = &is_null[0]; parm_bind[0].length= &str_length[0]; //bind lot parm_bind[1].buffer_type = MYSQL_TYPE_STRING; parm_bind[1].buffer = (void*) &lot; parm_bind[1].buffer_length = sizeof(lot); parm_bind[1].is_null=&is_null[1]; parm_bin

RE: prepared statement problems

2005-08-18 Thread Sujay Koduri
Send the code if it is still not working. sujay -Original Message- From: Darrell Cormier [mailto:[EMAIL PROTECTED] Sent: Thursday, August 18, 2005 7:16 PM To: mysql_list Subject: Re: prepared statement problems Sujay Koduri said the following on 08/18/2005 12:31 AM: >Hi, >

Re: prepared statement problems

2005-08-18 Thread Darrell Cormier
ind)); str_length[0]=6; str_length[1]=12; strncpy(lot, "5028368",12); strncpy(facility, "XTEX6",6); //bind facility parm_bind[0].buffer_type= MYSQL_TYPE_STRING; parm_bind[0].buffer= (char*)&facility; parm_bind[0].buffer_length= 6; parm_bind[0].is_null= 0

RE: prepared statement problems

2005-08-17 Thread Sujay Koduri
: Thursday, August 18, 2005 1:23 AM To: mysql_list Subject: prepared statement problems Greetings, I am trying to figure out prepared statements in the C-API. The problem I am having is passing parameters to a prepared statement. If I hard code everything in my SQL statement, like: static char

prepared statement problems

2005-08-17 Thread Darrell Cormier
Greetings, I am trying to figure out prepared statements in the C-API. The problem I am having is passing parameters to a prepared statement. If I hard code everything in my SQL statement, like: static char *sql_stmt = { "select product " "from lth &quo

Re: modifying prepared statement parameters

2004-11-22 Thread Gleb Paharenko
Hello. You may use something like: prepare stmtl from 'select * from ren1 where yo like concat("%",?,"%")'; set @a='1'; execute stmtl using @a; Nathan Coast <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to modify parameters passed to prepared statements? > > e.g. >

modifying prepared statement parameters

2004-11-20 Thread Nathan Coast
Hi, Is it possible to modify parameters passed to prepared statements? e.g. select ... where username like '%?%' I'd like to put wildcard chars '%' on either end of a parameter. Is this legal? or do I have to modify the parameter before passing it to mysql. thanks Nathan -- Nathan Coast Ma

RE: Prepared statement for MySQL 4.1

2004-11-11 Thread Kevin Cowley
9099 (direct line) Email: [EMAIL PROTECTED] Web: http://www.alchemetrics.co.uk > -Original Message- > From: Fagyal Csongor [mailto:[EMAIL PROTECTED] > Sent: 11 November 2004 18:10 > To: 'Mysql ' (E-mail) > Subject: Re: Prepared statement for MySQL 4.1 >

Re: Prepared statement for MySQL 4.1

2004-11-11 Thread Fagyal Csongor
Scott, I've read the article about 'prepared statement' found in MySQL 4.1, and am not sure if I understood what 'prepared statement' does and how can it benefit us. Can anyone elaborate on what 'prepared statement' could do with examples where possible?

RE: Prepared statement for MySQL 4.1

2004-11-11 Thread Scott Hamm
*THAT* one was what I already ready and could not understand it since English isn't my first language. -Original Message- From: Mark Maunder [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11, 2004 12:45 PM To: Scott Hamm Cc: 'Mysql ' (E-mail) Subject: Re: Prepared stat

Re: Prepared statement for MySQL 4.1

2004-11-11 Thread Mark Maunder
Scott, http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html regards, Mark. On Thu, 2004-11-11 at 15:38, Scott Hamm wrote: > I've read the article about 'prepared statement' found in MySQL 4.1, and am > not sure if I understood what 'prepared stat

Re: Prepared statement for MySQL 4.1

2004-11-11 Thread Gleb Paharenko
Hello. As said at documentation: "Prepared execution is an efficient way to execute a statement more than once." Good examples you can find in documentation to MySQL, and in tests/client_test.c. Scott Hamm <[EMAIL PROTECTED]> wrote: > I've read the article a

Prepared statement for MySQL 4.1

2004-11-11 Thread Scott Hamm
I've read the article about 'prepared statement' found in MySQL 4.1, and am not sure if I understood what 'prepared statement' does and how can it benefit us. Can anyone elaborate on what 'prepared statement' could do with examples where possible? Thanks,

Re: Prepared Statement questions/issues

2004-08-25 Thread Leonardus Setiabudi
Hi Ken.. this might not solve your problem.. but, did you really have to do this create table raddata ( granIDinteger not null, scanIDtinyint unsigned not null, fpID tinyint not null, c1smallint, c2

Re: Prepared Statement questions/issues

2004-08-25 Thread Daniel Kasak
Ken Gieselman wrote: Hi Folks -- I'm running into some issues with large prepared statements, and would love some feedback about approaches or tweaks that I might have overlooked :) Any suggestions as to how to do this more efficiently/faster? Or how to increase the buffer space for the prepar

Prepared Statement questions/issues

2004-08-18 Thread Ken Gieselman
Hi Folks -- I'm running into some issues with large prepared statements, and would love some feedback about approaches or tweaks that I might have overlooked :) I'm working on a large-scale database for scientific data -- lots of individual detector values and whatnot, that unfortunately need to

C API Prepared Statement Interface - MYSQL_BIND

2003-11-19 Thread Richard Tibbetts
I am finding the documentation located at http://www.mysql.com/doc/en/C_API_Prepared_statement_datatypes.html on the C API Prepared Statement Interface to be a bit unclear. In the MYSQL_BIND datatype, when using mysql_bind_param() and mysql_excute() to pass parameters to a prepared statment, how

prepared statement vs multiple query

2003-07-30 Thread Vladimir Zheleznyak
Hello, Is prepared statement compatible with multiple query executilng? Best regards, Vladimir Zheleznyak -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: support for Prepared statement

2003-06-19 Thread Ivan Cukic
Deepak> I wrote a program to check for Stored Procdures is running fine. Deepak> Now what i want to knwo is whether MySQL server is supporting Stored Procedures or not? Not yet, but will be supported in the 5.o version. Ivan --

support for Prepared statement

2003-06-19 Thread Deepak Saini
Hi All, I am using MySQL 4.0.13 and using Connector/j jdbc drivers. What i am looking for is the support for Stored Procedures. Following is what Connector/J documentation says. "PreparedStatements are implemented by the driver, as MySQL does not have a prepared statement feature. Becau

Re: prepared statement

2002-11-25 Thread Mark Matthews
Hamid Amjadi wrote: Hi ; I am usein the following prepared statement: insertOne = dbConnection.prepareStatement( "INSERT INTO appointment (apptId,providerId,patientId,serviceLocationId, dateTime, assistant, duration,state,statechange,memo,cancelMemo,dictationMarked, apptSeqId, cli

prepared statement

2002-11-25 Thread Hamid Amjadi
Hi ; I am usein the following prepared statement: insertOne = dbConnection.prepareStatement( "INSERT INTO appointment (apptId,providerId,patientId,serviceLocationId, dateTime, assistant, duration,state,statechange,memo,cancelMemo,dictationMarked, apptSeqId, clinicId, appSharing) v

Re: Prepared Statement Problem

2002-10-31 Thread Mark Matthews
Heikki Tuuri wrote: Ryan, - Original Message - From: "rcandersonmn" Newsgroups: mailing.database.mysql Sent: Thursday, October 31, 2002 4:23 PM Subject: Prepared Statement Problem >I'm new to MySQL and am having problems with Prepared Statements in >MySQL. I

Re: Prepared Statement Problem

2002-10-31 Thread Heikki Tuuri
Ryan, - Original Message - From: "rcandersonmn" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, October 31, 2002 4:23 PM Subject: Prepared Statement Problem > I'm new to MySQL and am having problems with Prepared Statements in > MySQL.

Re: why doesn't prepared statement work?

2001-11-20 Thread Dan Nelson
In the last episode (Nov 20), yilmaz said: > Well, > i am answering my own question. > It was keeping telling me that there is a syntax error. > However, the real problem was at the bottom the preparedstatement code > snippet > "stmt.executeUpdate(query);" > statement should have been > "stmt.ex

Re: why doesn't[sic] prepared statement work?

2001-11-20 Thread Mark Matthews
There have been issues with certain prepared statements and older versions of MM.MySQL. I suggest you upgrade to the latest (2.0.7) available from http://mmmysql.sourceforge.net/. You should not surround your ?'s with single quotes (leave them bare), and contrary to the previous messages, you do

Re: why doesn't prepared statement work?

2001-11-20 Thread yilmaz
day, November 20, 2001 9:08 PM Subject: Re: why doesn't prepared statement work? > Thanks Neil, > even with only one parameter it doesn't work. > it keeps throwing: > > javax.servlet.ServletException: Syntax error or access violation: You have > an error in y

Re: why doesn't prepared statement work?

2001-11-20 Thread yilmaz
quot;yilmaz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 7:29 PM Subject: Re: why doesn't prepared statement work? > Yilmaz, > Recommend you simplify. Test on (say) the first five fields, then the next five,... and try to work out which >

Re: why doesn't prepared statement work?

2001-11-20 Thread DL Neil
list. Regards, =dn - Original Message - From: "yilmaz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 20 November 2001 10:18 Subject: Re: why doesn't prepared statement work? > Thanks Hans, > when i replcaed ? with "?" , this time i ma having &

Re: why doesn't prepared statement work?

2001-11-20 Thread yilmaz
CTED]> Sent: Wednesday, November 21, 2001 8:48 AM Subject: Re: why doesn't prepared statement work? > maybe u should use '?' instead of ?. > Btw, isn't that special char which need function htmlspecialchars() ? > > - Original Message - > From: "yilm

why doesn't prepared statement work?

2001-11-20 Thread yilmaz
Hi all, i have a strange situation here, i am trying to execute an sql insert via prepared statements. though it is a simple insert process, i am having a syntax error message. Doesn't mysql support this? can someone please tell me what is wrong with this query? String query="insert into temp(mem

why doesn't prepared statement work?

2001-11-20 Thread yilmaz
Hi all, i have a strange situation here, i am trying to execute an sql insert via prepared statements. though it is a simple insert process, i am having a syntax error message. Doesn't mysql support this? can someone please tell me what is wrong with this query? String query="insert into temp(mem