Hi again,
I solved the weird thing but the original myODBC error is still there. How
do I know what values are suitable for my application. I'm using MediumBlob
to store my data so at any one time, the max amount of data to insert would
be 16M. So am I supposed to set max_allowed_packet to 16M, and if so, how
much should I set the key_buffer_size to. The key read/key read request =
approx 0.3969 and the key write/key write request = approx. 0.666. I don't
really know what this means but the manual says it should be <0.01.
Currently the variables are set as followed:
[mysqld]
set-variable = key_buffer_size=16M
set-variable = max_allowed_packet=1M
As I have mentioned earlier, I couldn't even get >1MB through. Any idea
anyone?
Thanks,
Li Sze
----- Original Message -----
From: Li Sze <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 4:35 PM
Subject: Re: MyODBC Error, SQLGetData
> Hi,
>
> Thanks Miguel, I'll look through the manual.
>
> Another weird thing came up while I was testing the following code. The
> cbData in the following line of code always turns up as 8164. Previously,
> the cbData will indicate the size of the data to be retrieved.
>
> --------------------------------------------------------------------------
--
> -----------
> g_rc = SQLGetData(hstmt, 11, SQL_C_BINARY, &theVersions.byData, n,
> &cbData);
> if (g_rc == SQL_ERROR)
> ProcessLogMessages(SQL_HANDLE_STMT, hstmt, "SQLGetData() Failed\n\n",
> TRUE);
>
> while (g_rc == SQL_SUCCESS_WITH_INFO || g_rc == SQL_SUCCESS)
> {
> if (cbData > (SDWORD) n)
> {
> if (::WriteFile(hFile, &theVersions.byData, n, &dwWriteSize, NULL) ==
> 0) {
> dwFileIOError = ::GetLastError();
> TRACE("WriteFile error: %d\n", dwFileIOError);
> }
> } else {
> if (::WriteFile(hFile, &theVersions.byData, cbData, &dwWriteSize,
NULL)
> == 0) {
> dwFileIOError = ::GetLastError();
> TRACE("WriteFile error: %d\n", dwFileIOError);
> }
> }
> g_rc = SQLGetData(hstmt, 11, SQL_C_BINARY, &theVersions.byData, n,
> &cbData);
> if (g_rc == SQL_ERROR)
> ProcessLogMessages(SQL_HANDLE_STMT, hstmt, "SQLGetData() Failed\n\n",
> TRUE);
> }
> --------------------------------------------------------------------------
--
> -----------
>
> As I did not change anything, I'm really confused why it became constant.
> Even files that I've successfully tried retrieving yesterday doesn't work
> anymore.
>
> Li Sze
>
>
>
> ----- Original Message -----
> From: Miguel Angel Solórzano <[EMAIL PROTECTED]>
> To: Li Sze <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, February 02, 2001 1:41 PM
> Subject: Re: MyODBC Error
>
>
> > At 12:23 02/02/2001 +0800, Li Sze wrote:
> > Hi,
> >
> > Try to use the variables below in your my.cnf file:
> >
> > [mysqld]
> > set-variable = key_buffer_size=16M
> > set-variable = max_allowed_packet=1M
> >
> > Set the values according with your necessities and read in the
> > MySQL Manual the item Tuning server parameters.
> >
> > Regards,
> > Miguel
> >
> >
> >
> > >Hi,
> > >
> > >I'm using SQLPutData and SQLParamData to insert data into the database.
> It
> > >works fine with data files smaller than 1MB. However, I get the
following
> > >error for the last call to SQLParamData when the data file is more than
> 1MB.
> > >I have no idea what the following error means. I would really
appreciate
> it
> > >if someone could tell me what went wrong or if I need to include more
> > >information about this problem. Thanks in advance.
> > >
> > >The following is the trace log from myodbc.
> >
>
>---------------------------------------------------------------------------
> -
> > >myMFC fff63add:fff7fe09 ENTER SQLPutData
> > > HSTMT 0x00891258
> > > PTR 0x01710004
> > > SDWORD 64974
> > >
> > >myMFC fff63add:fff7fe09 EXIT SQLPutData with return code 0
> > >(SQL_SUCCESS)
> > > HSTMT 0x00891258
> > > PTR 0x01710004
> > > SDWORD 64974
> > >
> > >myMFC fff63add:fff7fe09 ENTER SQLParamData
> > > HSTMT 0x00891258
> > > PTR * 0x0066eb78
> > >
> > >myMFC fff63add:fff7fe09 EXIT SQLParamData with return
code -1
> > >(SQL_ERROR)
> > > HSTMT 0x00891258
> > > PTR * 0x0066eb78
> > >
> > > DIAG [HY000] [TCX][MyODBC]MySQL server has gone away (2006)
> >
>
>---------------------------------------------------------------------------
> -
> > >
> > >Regards,
> > >Li Sze
> >
> > __ ___ ________ __
> > / |/ /_ __/ __/ __ \/ / http://www.mysql.com/
> > / /|_/ / // /\ \/ /_/ / /__ Miguel Solórzano <[EMAIL PROTECTED]>
> > /_/ /_/\_, /___/\___\_\___/ São Paulo, Brazil
> > <___/ Development Team
> >
> >
> > ---------------------------------------------------------------------
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php