RowGuid and SQL2005 - InfoPath Dev
in

InfoPath Dev

RowGuid and SQL2005

Last post 02-19-2010 08:29 AM by dswick. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-18-2010 03:00 PM

    • dswick
    • Not Ranked
    • Joined on 02-17-2010
    • Posts 5

    RowGuid and SQL2005

    I have a form that links to a SQL2005 DB that I was hoping to use a field defined as a uniqueidentifier and auto populate with the newid() function.  This works fine when i am adding fields via the SQL management studio but when I try and submit a form to the table, i recieve the following error:

    "Infopath cannot submit the form because it contains validation erros that are not in the current view.  Errors ......." 

    Field or group: pkey (defined as a uniqueidentifier and default value of (newid()))
    Error: Only specific pattern allowed

    I guess I could generate the newid() value in VB code and somehow push this out when the form is published but it would make things easier if the DB could just handle creating the primary key.

     

    Thanks for your help

  • 02-19-2010 08:21 AM In reply to

    Is your GUID column your primary key in your DB? I was trying to test this, and SQL was quite upset that I wanted to set my GUID column with a calculated default to the PK.

    (If you don't want to write code for a GUID, and if you are using IP 2007, you could give qRules a try. GenerateGuid is one of many cool commands.)

    Hilary Stoupa

  • 02-19-2010 08:29 AM In reply to

    • dswick
    • Not Ranked
    • Joined on 02-17-2010
    • Posts 5

    Yes the GUID column in the SQLdb is the primary key.  I am an old VB programmer and this has worked fine to let SQL generate the newID but Infopath will not allow me to submit the form when I have not assigned a value to field in the DB that does not allow nulls....

     

    Thanks for your help

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.