| |

VerySource

 Forgot password?
 Register
Search
View: 1455|Reply: 7

Lost connection to MYSQL server during query socket error on write.

[Copy link]

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-22 14:00:01
| Show all posts |Read mode
Lost connection to MYSQL server during query socket error on write. WSAGetLastError return 10054 ($ 2746)
I am inserting a binary file into the database. When the file is about 2MB, there is no problem. Above 3MB, the above problem occurs.
Please advise. Thank you
Reply

Use magic Report

0

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Invalid IP Address

Post time: 2020-7-1 10:00:01
| Show all posts
Is the field definition not long enough?
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-4 20:15:02
| Show all posts
I defined file_data longblob like this,
No write length
Reply

Use magic Report

0

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-7-7 12:00:01
| Show all posts
Let's take a look at the point source program. It is too unclear to say this, maybe it is not a problem.
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-19 23:30:01
| Show all posts
MyQuery->SQL->Clear();
        AnsiString str = "select * from TabAttachedFiles";
        MyQuery->SQL->Add(str);
        try
        {
            MyQuery->Open();
        }
        catch(...)
        {
            ;
        }
        MyQuery->Append();
        MyQuery->FieldByName("bugID")->Value = bugID;
        MyQuery->FieldByName("file_name")->Value = ::ExtractFileName(dlg->FileName);
        TBlobField *Field = (TBlobField*)MyQuery->FieldByName("file_data");
        Field->LoadFromFile(dlg->FileName);
        MyQuery->Post();//Not here. It’s okay when the file is small, but not when it’s large
        MyQuery->Close();
I use MyDAC control
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-8-2 14:30:01
| Show all posts
Set up BDE
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 United States

 Author| Post time: 2020-8-2 16:00:01
| Show all posts
The problem is solved
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-8-3 19:15:01
| Show all posts
Lost connection to MYSQL server
You are not linked
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list