problems with sql and non-string-typed fields - InfoPath Dev
in

InfoPath Dev

problems with sql and non-string-typed fields

Last post 08-09-2006 03:22 AM by Daniel. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-09-2006 03:22 AM

    • Daniel
    • Not Ranked
    • Joined on 08-09-2006
    • Hungary
    • Posts 1

    problems with sql and non-string-typed fields

    Hi All!

    I'm new to InfoPath 2007, just started a few days ago.
    I have created a form with simple controls on it and I have some code behind written in c# VS2005.
    I would like to query a SQL database and populate some of the fields and publish this form to a network drive but I have encountered a few problems:

    1: My Office doesn't seem to have the required permissions to connect to the SQL. I can connect to it in any other way but not from my form code.

    2: I can not set the value of a non-string-typed field.

    I have a NumberOfItems field which has a type of integer.
    The code:

    XPathNavigator NumberOfItems = MainDataSource.CreateNavigator().SelectSingleNode("my:myFields/my:NumberOfItems", NamespaceManager);
    NumberOfItems.SetValue("123");

    The error message:
    Schema validation found non-data type errors.

    3: I publish my form with the Publish Wizard and the summary says that the permission level is domain. But when I want to open the template from the published location it says the form has restricted permission level and it should have domain and suggests to open it from the published location.

    Any idea to these problems?

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