Copied to clipboard

Flag this post as spam?

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


  • pronto 61 posts 172 karma points
    May 02, 2014 @ 11:32
    pronto
    0

    Querying Azure SQL DB from Umbraco 7

    Hey Everyone,

    I'm playing around with an Umbraco 7.1.1 site on Azure ( as a Web Site ) but I'm having trouble retrieving data from a custom table in my Azure SQL database. When I do so I get the error "Keyword not supported: 'flush interval'", could this be a compatibility issue with Azure SQL?

    edit: here is a snippet of my code:

    ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings["umbracoDbDSN"];
    using(SqlConnection con = new SqlConnection(cs.ToString()))
    {
        string sql = "SELECT * FROM [dbo].[MyTable]";
        con.Open();
        using(SqlCommand cmd = new SqlCommand(sql,con))
        {
            SqlDataReader reader = cmd.ExecuteReader(); 
        }
        con.Close();
    }

     

  • Andrew McCaughan 3 posts 23 karma points
    May 02, 2014 @ 13:26
    Andrew McCaughan
    0

    Instead of using cs.ToString(), try using cs.ConnectionString

  • pronto 61 posts 172 karma points
    May 02, 2014 @ 15:27
    pronto
    0

    Hey Andrew,

    Thanks for the reply, unfortunately I still get the same error with your suggestion so I'm still not sure where the problem is!

Please Sign in or register to post replies

Write your reply to:

Draft