Example Web Service Code? Probably Really easy for you guys :D - InfoPath Dev
in

InfoPath Dev

Example Web Service Code? Probably Really easy for you guys :D

Last post 10-12-2007 05:50 AM by alex350r. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-11-2007 02:17 AM

    Example Web Service Code? Probably Really easy for you guys :D

    Hi all,

     I have created a web service in VS2005 allowing me to submit data from my Infopath form to an SQL Server 2005 DB. It works but i cannot recieve data through this webservice i get an error about the 'diffgram'??

     I need to get this recieve bit working urgently for a meeting tomo and am at a lost cause of how to do it. I will post the code i am using later but am at University at the moment.

     I think my error is because i am using DataSets. Could someone post some basic code that i could adjust to fit my db? i have searched for hours on the internet, tried about 20 odd examples and cant get them to perform correctly.

     Thanks in advance,

     Alex

  • 10-12-2007 05:50 AM In reply to

    Re: Example Web Service Code? Probably Really easy for you guys :D

    BUMP Guys, here is the code im using, the 'Insert GD' function works fine but i cannot use the 'GetGD' function, i get an error about the 'Dataset contains a diffgram with a different name than the schema indicates'

    Option Strict Off

    Imports System.Web

    Imports System.Web.Services

    Imports System.Web.Services.Protocols

    Imports System.Data

    Imports System.Data.SqlClient

    Imports GD

     

    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

    Public Class RFQWebServiceInherits System.Web.Services.WebService

     

    '<WebMethod()> _

    ' Public Function GetGD() As GD.GeneralDataDataTable

    'Dim myAdapter As New GDTableAdapters.GeneralDataTableAdapter

    ' myAdapter.GetData()

    ' Return myAdapter.GetData

    ' End Function

    <WebMethod()> _

    Public Sub InsertGD(ByVal vehicle_manufacturer As String, ByVal customer As String, ByVal program_code As String, ByVal vehicle_name As String, ByVal project_life As Integer, ByVal start_date As String, ByVal sop As String, ByVal customer_supply_basis As String, ByVal enquiry_raised_date As String, ByVal customer_enquiry_date As String, ByVal rfq_date As String, ByVal deadline As String, ByVal replaces_previous As String, ByVal previous_enquiry As String, ByVal stand_component As String, ByVal sales_value As Integer, ByVal tmc_available As String, ByVal capex_value As Integer, ByVal quantity_confirmed_annum As Integer, ByVal quantity_confirmed_lifetime As Integer, ByVal terms_understood As String, ByVal subdate_achievable As String, ByVal drawlevel_confirmed As String, ByVal requirements_defined As String, ByVal npi_resource_available As String, ByVal ds_available As String, ByVal site_confirmed As String, ByVal capacity_available As String, ByVal log_req_understood As String)Dim myAdapter As New GDTableAdapters.GeneralDataTableAdapter

    myAdapter.Insert(vehicle_manufacturer, customer, program_code, vehicle_name, project_life, start_date, sop, customer_supply_basis, enquiry_raised_date, customer_enquiry_date, rfq_date, deadline, replaces_previous, previous_enquiry, stand_component, sales_value, tmc_available, capex_value, quantity_confirmed_annum, quantity_confirmed_lifetime, terms_understood, subdate_achievable, drawlevel_confirmed, requirements_defined, npi_resource_available, ds_available, site_confirmed, capacity_available, log_req_understood)

    End Sub

    End Class

     

    I have commented out GetGD for the minute, can any of you see the problem with my code?

     Thanks,

    Alex

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