cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
schuess3
Kudo Kingpin
Kudo Kingpin

Ant Keep Marching on Patch to New Azure SQL DB

Issue:

Data Source Never Gets Patched

 

Background

  • New Azure SQL DB
  • Connector was established using SQL Admin Credentials Defined when Database was Created
  • Patch Statement is: Patch('[dbo].[CPT_Codes]',Defaults('[dbo].[CPT_Codes]'),{CPT_Code:txtCPT_Code,CPT_Value:txtCPT_Value});Reset(txtCPT_Code);Reset(txtCPT_Value);
  • Ants keep marching across top of screen
  • No Errors 
  • No info

What can i check? Is this possibly a permissions thing cause I used the SQL Admin credentials? 

 

Update

I was able to successfully add data to the database table using the SubmitForm() method. So that confirms the account has the access I need. So my problem must relate to how I am trying to patch() the data.

 

More Updates

I was able to  get the Data Source Patched after creating a new login and user account on the DB with dbo rights. I will say that it sucks that you do not get a GUI Wizard when using SSMS with Azure SQL DBs. I am still fighting with some data source refreshes and unknown runtime errors but i am hoping that gets resolved. 

 

Thanks

Matt

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @schuess3 ,

Have you solved your problem?

Does the txtCPT_Code, txtCPT_Value represent the Text Input box in your app?

 

If the txtCPT_Code, txtCPT_Value represents the Text Input box in your app, please modify your formula as below:

Patch(
'[dbo].[CPT_Codes]',
Defaults('[dbo].[CPT_Codes]'),
{
CPT_Code: txtCPT_Code.Text,
CPT_Value: txtCPT_Value.Text
}
);
Reset(txtCPT_Code);
Reset(txtCPT_Value);

or

Collect(
      '[dbo].[CPT_Codes]',
       {
         CPT_Code: txtCPT_Code.Text, 
         CPT_Value: txtCPT_Value.Text
       }
);
Reset(txtCPT_Code);
Reset(txtCPT_Value);

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @schuess3 ,

Have you solved your problem?

Does the txtCPT_Code, txtCPT_Value represent the Text Input box in your app?

 

If the txtCPT_Code, txtCPT_Value represents the Text Input box in your app, please modify your formula as below:

Patch(
'[dbo].[CPT_Codes]',
Defaults('[dbo].[CPT_Codes]'),
{
CPT_Code: txtCPT_Code.Text,
CPT_Value: txtCPT_Value.Text
}
);
Reset(txtCPT_Code);
Reset(txtCPT_Value);

or

Collect(
      '[dbo].[CPT_Codes]',
       {
         CPT_Code: txtCPT_Code.Text, 
         CPT_Value: txtCPT_Value.Text
       }
);
Reset(txtCPT_Code);
Reset(txtCPT_Value);

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Missing the .text was part of the unknown runtime error. And the bulk of the original issue was a SQL Database permissions issue. 

 

Thanks.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,375)