SQL inserts don't work anymore on my new windows dedicated server

Discussion in 'Site & Server Administration' started by CristinaMicu, Apr 12, 2014.

  1. #1
    Hi,

    I have a nasty issue. I recently changed the server for my sites and the most of the SQL inserts don't work anymore. It is a windows dedicated server with the details:

    Server: Microsoft-IIS/7.5
    Server type: MySQL
    Server version: 5.7.3-m13-log - MySQL Community Server (GPL)

    I'm pretty sure it's a server setting. I tested on a few servers and it still works perfectly. The previous server was also a windows server and all was working just fine.

    Maybe it has to do with a setting that affect inserts and filds that don't accept null values?

    Any help it's appreciated.

    Thanks
     
    CristinaMicu, Apr 12, 2014 IP
  2. TIEro

    TIEro Active Member

    Messages:
    741
    Likes Received:
    177
    Best Answers:
    5
    Trophy Points:
    70
    #2
    Contact your support. It may be something dumb like the DB user not having permission, but it could equally be something behind the scenes, a default you don't see without hunting around.

    Since you're paying for a dedicated server, make them work for their money. :)
     
    TIEro, Apr 12, 2014 IP
  3. superprg

    superprg Well-Known Member

    Messages:
    292
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Are you seeing any errors?
    Sometimes, the table gets locked because of a pending transaction and connection was not closed
    Try restarting the database server and it should be working
     
    superprg, Apr 12, 2014 IP
  4. CristinaMicu

    CristinaMicu Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    Hi, many thanks for your answers. We researched a little more and problem without answer, but explained:

    If the online table have the following filds:

    Id_Online
    Store_Logo
    Store_Name
    Product_Name

    With the Nul set to no with none.

    Inserts like this worked before:
    insert into online(Store_Logo,Store_Name) values(val4Store_Logo,val4Store_Name)

    Now we need to provide an insert statement that needs to contain values for all the fields like this:

    insert into online(Id_Online,Store_Logo,Store_Name,Product_Name) values(val4Id_Online,val4Store_Logo,val4Store_Name,val4Product_Name)

    If the above insert don't have any imput value for Product_Name field, even if have all the fields in the insert, don't work.

    We also think that some settings is off / on.
     
    CristinaMicu, Apr 12, 2014 IP
  5. superprg

    superprg Well-Known Member

    Messages:
    292
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    120
    #5
    Are you seeing any errors when you run the above insert query?
     
    superprg, Apr 12, 2014 IP