Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bryan 4 posts 105 karma points
    Mar 28, 2017 @ 20:43
    Bryan
    1

    Value cannot be null.\r\nParameter name: sqlSyntax

    I've read through all that I can find on this error but nothing is helping.

    I had perfectly fine local website set up. I deployed it and successfully restored the live database.

    I cannot access the website as it says my XML cache is corrupt. However, I can't clear the XML cache because I also can't login to the Umbraco back-office. I receive this error found in the network tab in Chrom dev tools after attempting to login:

    "Value cannot be null.\r\nParameter name: sqlSyntax"

    I've tried clearing browser cache, checked my config files, replaced config files, tried several connstrings, and find no help within the APP_DATA log file other than a repeat of the error displayed above. I am out of ideas and could really use some help.

  • Bryan 4 posts 105 karma points
    Mar 28, 2017 @ 23:32
    Bryan
    0

    I finally fixed the problem. It was a bad connectionString. However, I'm still unsure of the reasoning. I'm currently following up with my host provider.

    I'm assuming it wasn't connecting to the database but I don't know why I wasn't receiving the error saying that I couldn't connect to the database and instead throwing the null "sqlSyntax" error. I don't know I'm still new to all this database stuff.

    Follow up: In the end it was a result of poor documentation.

    Being as this likely doesn't contribute to any Umbraco users, this thread can probably be deleted.

  • Chris Evans 137 posts 353 karma points c-trib
    Mar 29, 2017 @ 01:23
    Chris Evans
    1

    In what way was the connection string bad?

    eg. was it username or password incorrect, or was it malformed xml, or something else?

    That kind of info can help other users if they see this error message - but you're right, it should ideally show something more specific to the problem.

  • Bryan 4 posts 105 karma points
    Mar 29, 2017 @ 01:41
    Bryan
    100

    It had to do with the server host or IP provided. I was attempting to connect to a database with sqlserver 2016.

    The database HOST/IP provided was in the format of:

    41.12.63.3SQL2016,841

    Where documentation had left out the part where I needed to place a '\' before the "SQL2016" in the connection string. Not sure if that's a common HOST name or if it's common knowledge but I never would have figured it out.

  • Chris Evans 137 posts 353 karma points c-trib
    Mar 29, 2017 @ 01:53
    Chris Evans
    0

    Gotcha. So it was unable to find the server; but like you say, the error message Umbraco was showing didn't make that clear.

    Were you missing a providerName attribute on the connection string tag at all? I have seen this error once when that was omitted.

  • Bryan 4 posts 105 karma points
    Mar 29, 2017 @ 02:30
    Bryan
    0

    In fact I was missing it. Reason being that I had tried adding the providerName a few times before but left it out because when I did add it I was getting the "Could not connect to the database" error. So I figured that was breaking something.

    Again, I'm new to database so maybe that should have been a flag but honestly I don't even know what the providerName does so I just assumed that was the broken part.

    In the end, I re-added the provider name and correctly inserted the '\' in the HOST of my connection string and it finally worked.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies