web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to connect Model D...
Power Apps
Unanswered

How to connect Model Driven App to a SQL serever table with a non-GUID primary key?

(0) ShareShare
ReportReport
Posted on by 79

Hi all,

 

I was trying to connect my model driven app to sql server using a virtual connector, but it seems that the SQL table needs to have a GUID field. My SQL table has a string primary key which cannot be parsed as GUID, so although the virtual table created it fails at runtime. is there any other way I can connect my app to SQL?

 

Thanks for your help.

Categories:
I have the same question (0)
  • timl Profile Picture
    36,634 Super User 2026 Season 1 on at

    @TaraAssadipour

    As you've discovered, the virtual connector for SQL requires the table to have a numeric/GUID primary key, or a string primary key that can be parsed as GUID.

    An alternative could be to build a canvas app and to embed that into your model driven app. The SQL connector in canvas apps supports string primary key values with non GUID values.

  • TaraAssadipour Profile Picture
    79 on at

    Thanks for your reply @timl. Is it possible to use the canvas app solely as a means to interact with the SQL table and then embed that functionality within my model-driven app? can I create a canvas app specifically for this purpose without any user interface elements? I want the canvas app to act as a bridge between mymodel-driven app and the SQL table (the forms are gonna be built by model driven app). I tried to embed a canvas app inside my model driven app, but still didn't have access to the sql table within canvas app. 

  • timl Profile Picture
    36,634 Super User 2026 Season 1 on at

    Hi @TaraAssadipour 

    In answer to your questions..
    >> Is it possible to use the canvas app solely as a means to interact with the SQL table and then embed that functionality within my model-driven app?

    Yes, it's possible to use the canvas app solely as a means to interact with the SQL table 

     

    >> can I create a canvas app specifically for this purpose without any user interface elements?

    If you're looking to build a canvas app to proxy the data between the model driven and the SQL table, unfortunately this isn't possible. The canvas app would need to contain the user interface elements.

  • TaraAssadipour Profile Picture
    79 on at

    Thanks for your answers @timl. I was hoping I could build all interfaces up through a model driven app (and not a canvas app), but as you mentioned, it seems that tables or data structures within the canvas app won't directly appear as tables within the model-driven app.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard