cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Patch issue with "read_only" database

hi,

 

i face an issue with a patch on a field in a sql server database.

although i'm connecting with an dbo_owner sql account (writing rights are granted), powerapps keep saying that my data source is read_only.

 

i've tried this other Thread  but it's unefficient...

 

has anybody an idea ?

 

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Patch issue with "read_only" database

Hi @GeekAlf_Pro ,

 

Does your SQL table have a primary key? I had met the same issue with you that if the table doesn't have a primary key, it only be read-only. So please first to define the primary key? It is required.

For SQL tables moving forward, please be sure to write your CREATE statement like this:

CREATE TABLE dbo.TableName (
    Id INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
    ...
)

Also you can find it in the prerequisites of SQL connector, source:  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-azure-sqldataba... 

 

 

After adding the primary key, you have to delete the SQL connection and re-add it. Then the table can work properly.

 

Hope this helps.

Sik

 

View solution in original post

4 REPLIES 4
Highlighted
Community Champion
Community Champion

Re: Patch issue with "read_only" database

If you have confirmed that the table is not a VIEW, I suggest you recreate the table with a different name. After that delete the read only table and rename the recreated table

 

If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Highlighted
Super User
Super User

Re: Patch issue with "read_only" database

As I mentioned in this thread, I would first check that there's a primary key on your table.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-sql-server-database/m-p/495546#M150212 

Highlighted
Community Support
Community Support

Re: Patch issue with "read_only" database

Hi @GeekAlf_Pro ,

 

Does your SQL table have a primary key? I had met the same issue with you that if the table doesn't have a primary key, it only be read-only. So please first to define the primary key? It is required.

For SQL tables moving forward, please be sure to write your CREATE statement like this:

CREATE TABLE dbo.TableName (
    Id INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
    ...
)

Also you can find it in the prerequisites of SQL connector, source:  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-azure-sqldataba... 

 

 

After adding the primary key, you have to delete the SQL connection and re-add it. Then the table can work properly.

 

Hope this helps.

Sik

 

View solution in original post

Highlighted
Helper I
Helper I

Re: Patch issue with "read_only" database

thanks @v-siky-msft 

it works !

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,774)