Creating web service from sql server 2005 - InfoPath Dev
in

InfoPath Dev

Creating web service from sql server 2005

Last post 10-27-2009 11:58 AM by tyampoo. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-23-2009 05:45 PM

    Creating web service from sql server 2005

    Hi,

     i am not sure if this subject fits here but i am developing a infopath form. I recently learnt that sql server 2005 can create a web service and i was thinking to learn coding for creating a web service in C#.

    Table 1 {Id, col1, col2}; Table 2 {Id, refToCol1, col2} in other word, table 1 is master and table 2 is child. How would i represent this schema in web services so that i can create infopath form based on it.

    any idea or direction is appreciated.

    thank you,

    (How would I see posts that i made in the past?)

    Tyampoo
  • 10-27-2009 10:40 AM In reply to

    Re: Creating web service from sql server 2005

    Hi,

    I create a web service using C# to try with based on example given in (http://weblog.vb-tech.com/nick/archive/2007/01/12/2088.aspx). Now my problem is i don't know how InfoPath decides which fields are required and which are not. There are fields which are required in database but infopath do not recongnize that but it treats some fields as required fields. What am i missing?

    Thank you, 

    Tyampoo
  • 10-27-2009 10:50 AM In reply to

    Re: Creating web service from sql server 2005

    I see this behavor: all fields that i did type casting in C# (which are not string) are treated as required fields in infoPath 2007. Is this true? If so, how would I have optional fields? Say StartDate for example!

    Tyampoo
  • 10-27-2009 11:58 AM In reply to

    Submitting/receiving data to SQL 2005 via web services

    Hi,

    here is my db:

    TravelRequest (TravelRequestId, TravelDate, Requester, PhoneNumber, ReasonForTravel, Approved, Approver, ApprovalDate)
    Traveller (TravellerId, TravelRequestId, Name, DateOfBirth)
    CarRentalInfo(CarRentalInfoId, TravelRequestId, PickupDate, ReturnDate, VehicleTypeId)
    VehicleTypes(VehicalTypeId, Description)

    I have defined class for each table with columns as attributes and a empty constructor.
    I have added Traveller and CarRentalInfo as a list of objects in TravelRequest

    I am trying to read/submit date to the database via web service written in C#.

    Problem:
    CarRentalInfo is optional and TravelRequestId is set as an identity in database. But InfoPath 2007 treats all non-string value as "required" fields and cannot submit data. Also I do not have any field listed under queryFields-->tns:GetAllTravelRequest.

     where and what am i missing?

     i tried posting my problem here http://www.infopathdev.com/forums/t/13594.aspx; but think it was a wrong place (?).

    Any direction, help is appreciated.
    Thank you for you time,

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