SELECT works, INSERT not

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
etk
Posts: 5
Joined: Thu 16 May 2013 07:38

SELECT works, INSERT not

Post by etk » Thu 16 May 2013 08:08

Hello,
Could you please comment if network/firewall settings can block SQL INSERT commands?

Short description of the problem: I created a .NET application using dotConnect 7.6 free. The application is installed on my notebook and works (I mean - performs all the CRUD commands) in a local LAN.

If I move and connect the same notebook through an additional switch the application performs all the SELECT commands but not the INSERT. The MySQL db user is granted all the CRUD rights as 'user'@'%' so the network should not be a problem. I run an SQL monitor on the server where the MySQL db resides and checked that all the SELECT queries reach the server but INSERT not. Any advice if I may please?

Edward

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: SELECT works, INSERT not

Post by Pinturiccio » Mon 20 May 2013 14:30

When you execute an insert query, what behavior do you observe? Does the application hang, or does the error "Server did not respond within the specified timeout interval" occur after the timeout period is exceeded, or does some other error occur?
Please also send us the stack trace of the exception.

etk
Posts: 5
Joined: Thu 16 May 2013 07:38

Re: SELECT works, INSERT not

Post by etk » Tue 21 May 2013 08:49

There are no error messages, no exceptions. There is only a short delay on INSERT query ~1s.
I run tcpdump on the machine where the MySQL server works, to capture the traffic from my notebook. What I observed is that the INSERT queries don't even reach the network interface of the machine running SQL server.
All the SELECT queries are captured (by tcpdump) there and perform immediately. BTW the INSERT query is a simple one - no dependencies, functions etc. - just inserting a single entity.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: SELECT works, INSERT not

Post by Pinturiccio » Tue 21 May 2013 15:02

Try executing this query using Connector/Net and inform us about the results. Connector/Net can be downloaded from the official website of MySQL http://dev.mysql.com/downloads/connector/net/

etk
Posts: 5
Joined: Thu 16 May 2013 07:38

Re: SELECT works, INSERT not

Post by etk » Thu 23 May 2013 12:02

I tried the Connector/Net and it works - I mean - all the CRUD operations. It makes me curious what can disturb dotConnect driver? The same machine, same data for connection string, same query etc. and only different drivers.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: SELECT works, INSERT not

Post by Pinturiccio » Fri 24 May 2013 14:11

We have answered you via e-mail.

etk
Posts: 5
Joined: Thu 16 May 2013 07:38

Re: SELECT works, INSERT not

Post by etk » Wed 29 May 2013 08:06

Thanks! In a few days I will be able to run the project on the network.

etk
Posts: 5
Joined: Thu 16 May 2013 07:38

Re: SELECT works, INSERT not

Post by etk » Mon 15 Jul 2013 13:31

I performed the test using the application you sent me. It could insert values when run from a machine connected to the same switch as the server. When run through the additional switch the SQL INSERT failed - same as with my application.
Finally I found the reason of the problem - the additional switch used another DSN. When I append a name/IP record there the application worked smoothly. Thanks for the help!

Post Reply