Page 1 of 1

SELECT works, INSERT not

Posted: Thu 16 May 2013 08:08
by etk
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

Re: SELECT works, INSERT not

Posted: Mon 20 May 2013 14:30
by Pinturiccio
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.

Re: SELECT works, INSERT not

Posted: Tue 21 May 2013 08:49
by etk
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.

Re: SELECT works, INSERT not

Posted: Tue 21 May 2013 15:02
by Pinturiccio
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/

Re: SELECT works, INSERT not

Posted: Thu 23 May 2013 12:02
by etk
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.

Re: SELECT works, INSERT not

Posted: Fri 24 May 2013 14:11
by Pinturiccio
We have answered you via e-mail.

Re: SELECT works, INSERT not

Posted: Wed 29 May 2013 08:06
by etk
Thanks! In a few days I will be able to run the project on the network.

Re: SELECT works, INSERT not

Posted: Mon 15 Jul 2013 13:31
by etk
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!