Connecting sensors data into Azure SQL database

Golebiowska, Paula 1 Reputation point
2020-12-29T16:00:31.217+00:00

Hello, I'm trying to get sensors data into Azure SQL database and I'm using this tutorial:

https://support.disruptive-technologies.com/hc/en-us/articles/360012253620
However after completing every step, I'm getting this errors in my function app log:

2020-12-29T15:56:20.073 [Error] Executed 'Functions.HttpTrigger1' (Failed, Id=ad7ca436-d01d-4d22-9b28-1642d29ca149, Duration=2ms)The ConnectionString property has not been initialized.

I discovered that in my connection string there's timeout set to 30, is it 30 minutes? How can I change it? Similar with default connection time in function app is set to 2h. How can I disable that timeout to import sensors data into the Azure database I created? I want it to be connected as long as I disable that connection.

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,631 Reputation points
    2020-12-30T06:59:13.26+00:00

    Hi @Golebiowska, Paula , welcome to Microsoft Q&A forum.

    I was looking into the same article and was able to successfully run it. After checking the error you mentioned it looks the connection string name defined in code as well as under application setting are not matching. Please check the yellow highlighted section as mentioned below with the code piece. These 2 must match:

     var str = Environment.GetEnvironmentVariable("SQLDB_CONNECTION");  
    

    52213-image.png

    Also, I used the runtime version 1 as shown in below screenshot. You can use 3 as well but it might needed some code changes. I have not tried version 3 as of now.

    52232-image.png

    Please let me know if this helps, or else we can discuss further.

    ----------

    If answer helps please select 'Accept Answer' as this could help others as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.