Microsoft hesabıyla oturum açın
Oturum açın veya hesap oluşturun.
Merhaba,
Farklı bir hesap seçin.
Birden çok hesabınız var
Oturum açmak istediğiniz hesabı seçin.

Not:  En güncel yardım içeriklerini, mümkün olduğunca hızlı biçimde kendi dilinizde size sunmak için çalışıyoruz. Bu sayfanın çevirisi otomasyon aracılığıyla yapılmıştır ve bu nedenle hatalı veya yanlış dil bilgisi kullanımları içerebilir. Amacımız, bu içeriğin sizin için faydalı olabilmesini sağlamaktır. Buradaki bilgilerin faydalı olup olmadığını bu sayfanın sonunda bize bildirebilir misiniz? Kolayca başvurabilmek için İngilizce makaleye buradan ulaşabilirsiniz .

A data connection is a dynamic link between a Microsoft Office InfoPath form and an external data source that stores or provides data for that form. A data source is a collection of fields and groups that define and store the data for a form. Controls are bound to fields and groups in the data source and display the data to users.

A form can have one primary data connection, called the main data connection, and it can optionally have one or more secondary data connections. Depending on your goals for the form, a data connection might query or submit form data to an external data source, such as a Microsoft SQL Server database or a Web service.

Bu makalede

Overview of data connections

A data connection is a dynamic link between a form and a data source that stores or provides data for that form. A form can have one primary data connection, called the main data connection, and it can optionally have one or more secondary data connections. The main data connection defines the main data source of the form. An XML Şemaları describes how data is stored in the form's main data source. There can be only one main data connection for a form, and it is created automatically when you create a form template that is based on an external data source. You can create as many secondary data connections as you want when you design a form template.

Depending on your goals for the form, you can create a main or secondary data connection to an external data source, such as a Microsoft SQL Server database or a Web service. An external data source is a data store that sends data to or can receive data from a form that is based on your form template. InfoPath works with the following external data sources:

  • Microsoft Office Access database

  • Microsoft SQL Server veritabanı

  • Web hizmeti

  • Document library or list on a server running Microsoft Windows SharePoint Services

  • XML dosyası

You can create three types of data connections to an external data source: query data only, submit data only, or both query and submit data. A query data connection receives data from a data source and stores that data in the form. A submit data connection sends data from the form to a data source, to an application on a Web server, to a document library on a server running Microsoft Windows SharePoint Services, or in an e-mail message. Query and submit data connections both receive data from and send data to a data source. When you create a data connection, you specify the type of data connection that you want. For example, you can create a data connection that does any of the following:

  • Queries data from a database

  • Submits form data in an e-mail message

  • Submits form data to an application on a Web server

  • Submits form data to a custom application that uses the XmlFormView control

  • Queries or submits data through custom programming code, such as C#, Microsoft Visual Basic .NET, or Microsoft JScript.

  • Uses connection settings stored in a data connection library on a server running Microsoft Office SharePoint Server 2007

  • Queries or submits data to Human Workflow Services on Microsoft BizTalk Server 2004 or BizTalk Server 2006

The type of connection that you use depends on your goals for the form and the type of external data source that you want to connect the form to.

Query data connections

A query data connection gets data from an external data source and stores that data in fields in the main or secondary data source of a form. You can then bağlama controls to those fields to display that data in the form. You can create a query data connection in the following ways:

  • Design a form template that is based on a database, Web service, or settings stored in a connection library. The structure of the external data source then defines the main data source for the form.

  • Modify an existing form template by adding a secondary data connection that queries a database, Web service, SharePoint list or library, or XML file.

When you design a new form template that is based on a database, Web service, or settings in a connection library, you create a query data connection that becomes the main data connection for forms that are based on that form template. You can define only one query data connection as the main data connection for a form template. If you need to query data from additional data sources, you can create secondary data connections that query data from those data sources. You will learn more about secondary data connections later in this article.

When you add a secondary data connection that queries data to your form template, you can specify whether InfoPath should use the data connection each time that the user opens the form or after specific events occur when the user fills out the form, such as clicking a button to display a list of options. To use the data connection after specific events occur, use one of the following methods:

  • Insert a button control that refreshes data in the form.

  • Add a rule to use the data connection when a condition on the form exists.

  • Write custom code for specific events.

Submit data connections

When users submit a form, data from that form is sent through a submit data connection to an external data source. You can configure that form template to allow users to send data to the following types of external data sources:

  • Microsoft Office Access database

  • Microsoft SQL Server veritabanı

  • Web hizmeti

Aşağıdaki yollarla veri gönderme ikincil veri bağlantılarını da ekleyebilirsiniz:

  • Submit form data to a document library on a server running Microsoft Windows SharePoint Services.

  • Submit form data in an e-mail message.

  • Submit form data to an application on a Web server.

You create a submit data connection in the following ways:

  • Design a new form template that is based on a database, Web service, or settings stored in a connection library on a server running Office SharePoint Server 2007. The structure of the external data source then defines the main data source for the form.

  • Modify an existing form template by adding a secondary data connection, and then configure the form template to allow users to submit their forms through this secondary data connection.

    İpucu: When you design a form template that is based on an Office Access or SQL Server database, InfoPath automatically configures a submit data connection if the database meets certain requirements. Find links to more information about those requirements in the See Also section. You can choose to disable the Submit feature if you want your users to submit their completed forms by using another type of submit data connection.

In most cases, you will configure one submit data connection as the main submit action for your form template. However, you can design your form template so that your users can submit their completed forms to multiple locations by using rules or custom code. For example, you can configure your form template to allow your users to submit their completed forms to a Web service as well as through an e-mail message. Typically, you configure the form template to submit all of the data in the form. However, if you use custom code to submit the form data or you are configuring the form template to allow the form to submit data to a Web service, you can submit a portion of the form's data.

Query and submit data connections

When you design a form template that is based on a database or a Web service, you can create a data connection that can get data from and submit data to the database or Web service. If you are designing a form template that is based on a database, the data connection can get or submit data. However, in order for forms based on this form template to submit data to the database, the following requirements must be met:

  • You are not designing a browser-compatible form template.

  • All of the tables in the main data connection must contain a primary key, unique constraint, or unique index.

  • All of the tables in the query must have a simple, hierarchical relationship.

  • None of the data fields in the main data source of the form can store a large binary data type.

You can learn more about these requirements in Considerations for connecting to external data sources later in this article.

A data connection that can get data from or submit data to a Web service is just like a query data connection and a submit data connection combined into a single data connection.

Sayfanın Başı

Ana veri bağlantısı ile çalışma

The main data connection establishes a connection to the main data source of the form. An XML Schema describes the structure for storing data in the main data source of the form. You can design the data source by using the Data Source task pane, or you can let InfoPath create the data source automatically as you add controls to your form template. You can also design a form template based on an external data source, which in turn defines the structure of the main data source. A form template can have only one main data connection.

If the main data connection connects to an external data source, how you work with the main data connection depends on the type of data source that it connects to.

Database    When you design a form template based on a database, InfoPath creates a main data connection that queries and optionally submits data to that database. If the form will be filled out only by using InfoPath and the database meets the requirements listed in the Considerations for connecting to external data sources section, InfoPath automatically creates a submit data connection and configures the form template to allow users to submit their forms. If the form will be filled out by using a browser, InfoPath does not create a submit data connection to the database. Data connections that submit data to a database are not supported in browser-compatible form templates.

İpucu: If the form will be filled out by using a browser and you want to submit data to a database, you can do so by connecting the form to a Web service that submits data to the database.

Web service    When you design a form template based on a Web service, you can create a main data connection that both queries and submits data, only queries data, or only submits data. If you choose to submit data, InfoPath automatically configures the form template to allow users to submit their forms. You can specify whether to submit some of the form data or all of the form data. If only some of the data is submitted, you can specify which fields in a particular grup contain the data that should be submitted, depending on the requirements of the Web service.

When you design a form template based on a database or Web service, InfoPath creates a main data source with query fields, data fields, and groups that correspond to the way that data is stored in the database or Web service. A query field contains the value that is used in a query to retrieve data from a database by using the query data connection. The results of the query are put into data fields, which can be edited when the user opens the form. When the user submits the form, the data in the data fields is sent by using the submit data connection. Because the fields and groups in the main data source must match the way that the data is stored in the external data source, you cannot modify these fields and groups. You can, however, add fields or groups to the root field in the main data source.

To enable users to view, select, edit, or submit data in data fields, you can bind controls, such as text boxes and check boxes, to the fields in the form. If you want to query and display additional values that users can select as a choice, you can bind a control such as a list box to the query fields. If you want users to select a value from a list, you can bind a control such as a list box to a data field and then set the properties of the control to display values from a secondary data source or a repeating field in the main data source.

Sayfanın Başı

Working with secondary data connections

A secondary data connection connects a form to an external data source. Secondary data connections are useful when you need to query or submit form data to an external data source other than the external data source in the main data connection, or when you want users to submit data to multiple external data sources. You can create as many secondary data connections as you want.

A secondary data connection can query or submit data to the following types of external data sources:

  • Office Access database

  • SQL Server veritabanı

  • Web hizmeti

  • Document library or list on a server running Windows SharePoint Services

  • XML dosyası

By using a secondary data connection, you can also enable users to submit form data to an application on a Web server, to a document library on a server running Windows SharePoint Services, or through an e-mail message.

If you create a secondary data connection that queries data, by default the form uses this data connection when the form opens. You can also use this data connection by configuring the form template in the following ways:

  • Add a refresh button to the form template that the user can click to send the query.

  • Add a rule to the form template to query the data source by using this data connection.

  • Add custom code to the form template that sends the query.

Bir ikincil veri bağlantısını forma eklediğinizde, InfoPath veri alanlarını ve veri dış veri kaynağında depolanan biçimini eşleştir gruplarıyla ikincil veri kaynağı otomatik olarak oluşturur. Bu veri bütünlüğünü sağlamak yardımcı olur. Alanlar ve gruplar ikincil veri kaynağında değişiklik yapamazsınız.

Sayfanın Başı

Storing data for offline use

When you add a secondary data connection that queries data from an external data source, you can configure the connection to store the results of the query on the user's computer. This ensures that users can fill out the form if their computers are not connected to a network. This is called working offline.

If you configure a secondary data connection in this way, the query is sent to the external data source while the user's computer is connected to the network. The results of the query are then stored in the secondary data source of the form, and they appear in the form when the user fills out the form. Data is cached each time the user performs a new query, so that the data is kept up to date as much as possible.

InfoPath, depolanan verileri belirli bir sorgu için uygun olup olmadığına karar verirken, sorgu parametreleri olarak değerlendirir. Veri bağlantısı oluşturduğunuzda, veri kaynağı kullanılamaz durumda formda depolanan verilerin varsayılan kümesi görüntülenip görüntülenmeyeceğini seçebilirsiniz. Sorgu verilerinden tüm kullanıcılarınızın veya formu her kullanıcıya özgü veriler olup görüntülemelidir için uygun olup olmadığını dikkate almanız gerekir. Sorgu tarafından döndürülen verileri kullanıcının kimliği veya rolüne dayalı ise, örneğin, bir varsayılan sorgu sonuçlarını kullanmak yerine tasarım zamanında yapılandırılmış veri kümesini kullanarak o kullanıcı için yanlış veri neden olabilir.

Sayfanın Başı

Dış veri kaynaklarına bağlanma dikkat edilmesi gereken noktalar

InfoPath supports data connections to the following types of external data sources:

  • Office Access database

  • SQL Server veritabanı

  • Web hizmeti

  • Document library or list on a server running Microsoft Windows SharePoint Services

  • XML dosyası

The following sections provide information and considerations for connection to each of these external data sources.

Microsoft Office Access or SQL Server database

InfoPath supports data connections to Access databases and SQL Server databases. To connect to another kind of database, you can use a Web service that works with that database.

A form can query data from a database through either a main or a secondary data connection, and you can select any number of database tables for a connection. The first table that you select is the primary table. Any table that you subsequently select must contain a field that is related to the primary table. InfoPath attempts to set this relationship by matching the field names in the two tables. You can choose to use this relationship or add your own table relationship when you create the data connection.

A form can submit data to a database through the form's main data connection if the form template that the form is based on and the database meet the following requirements:

  • Form şablonu olan bir tarayıcı uyumlu form şablonu    Tarayıcı uyumlu form şablonu tasarlarken InfoPath veri gönderme bağlantısı ana veri bağlantısında oluşturmaz. Kullanıcıların tarayıcı uyumlu form şablonu temel alan bir form verileri göndermelerine izin vermek için veritabanı ile çalışan bir Web hizmetini kullanın.

  • Her iki adet ana veri kaynağındaki ilgili tabloları sol tabloda birincil anahtar içerir    İlişkileri her ilişkili tablo çifti için en az biri sol tablodan birincil anahtar eklemeniz gerekir.

  • Form deposunun büyük ikili veri türü ana veri kaynağındaki verileri alanların hiçbiri    Büyük ikili veri türü, resimler, resimler, OLE nesneleri, dosya ekleri, Office Access Not veri türü veya SQL metin veri türü gibi depolanabilir alanları sorgu içeriyorsa, InfoPath veri gönderme bağlantısı devre dışı bırakır.

Form şablonu ve veritabanı tüm bu gereksinimleri karşılamıyorsa InfoPath veri gönderme bağlantısı oluşturur ve kullanıcıların formlarını göndermelerine izin vermek için form şablonunu yapılandırır. Kullanıcıların form verilerini farklı veri bağlantısı üzerinden göndermek istiyorsanız, ana veri bağlantısındaki veri gönderme bağlantısı devre dışı bırakabilirsiniz.

Bir veritabanını temel alan bir form şablonu tasarladığınızda, InfoPath sorgu alanları ve veriler veritabanında depolanır biçimini eşleşen veri alanlarını içeren bir ana veri kaynağı oluşturur. InfoPath, form şablonunun varsayılan görünüme Sorguyu Çalıştır ve Yeni kayıt düğmeleri de ekler. Bir kullanıcı Sorguyu Çalıştır düğmesini tıklattığında, InfoPath veritabanına sorgu alanında veri içeren bir sorgu gönderir. Yeni kayıt düğmesini herhangi bir veri formundaki temizler ve veri alanlarına veri alanının varsayılan değerini ilişkili denetimleri ayarlar. Bir kullanıcı veritabanına veri gönderdiğinde, veri alanlarını verilerde değişiklikleri veritabanındaki ilgili kayıtları değiştirin. Kullanıcı bir veri alandan veri siler, karşılık gelen kayıt veritabanından silinir. Son olarak, veri alanları eklenmiş olan herhangi bir veri karşılık gelen alanları güncelleştirir veya karşılık gelen kayıtların veritabanına ekler.

Form bir veritabanına bağlanmak istediğiniz ve ana veri bağlantısı için form oluşturulan, veritabanını sorgular ikincil veri bağlantısı ekleyebilirsiniz. Bir ikincil veri bağlantısı eklediğinizde, InfoPath ikincil veri kaynağı sorgu alanları, veri alanlarını ve veritabanı tablolardaki alanları eşleşen grupları oluşturur. Birden çok veritabanı tabloları seçin ve ana veri bağlantısı için yaptığınız gibi tablo ilişkileri kurabilirsiniz.

Bu sorguları verileri ikincil veri bağlantısı oluşturduğunuzda, kullanıcı form açılır her zaman sorgu göndermek için bağlantıyı yapılandırabilir veya sorguyu göndermek için aşağıdakilerden birini yapın:

  • Veri bağlantısından verileri yenilemek için tıklatabileceği bir düğme ekleyin.

  • Veri bağlantısını kullanarak sorguyu gönderen bir kural oluşturun.

  • Bunu çalıştırdığınızda sorguyu gönderir özel kod yazın.

Web hizmeti

Form, sorgu veya bir ana ya da ikincil veri bağlantısı üzerinden Web hizmeti veri göndermek. InfoPath Web hizmetlerine bağlantıları aşağıdaki standartları aynılarını:

  • Basit Nesne Erişim Protokolü (SOAP)    SOAP Web hizmeti ile iletişim kurmak için kullanılan XML iletileri tanımlayan iletişim protokolü olur.

  • Web Hizmetleri Açıklama Dili (WSDL)    WSDL XML konumunu, iletişim protokolü ve Web hizmetine arabirimleri açıklamak için kullanılan şema standart olur. InfoPath belge-sabit değer stili Web Hizmetleri kullanılmasına neden olabilir.

  • Evrensel açıklama bulma ve tümleştirme (UDDI)    UDDI açıklayan bir işletme tarafından sunulan Web Hizmetleri dizin hizmetidir.

Bir Web hizmetini temel alan yeni bir form şablonu tasarladığınızda, InfoPath Web hizmetinin ana veri bağlantısı oluşturur ve ardından sorgu alanları, veri alanlarını ve Web hizmeti XML şemasını eşleşen grupları içeren bir ana veri kaynağı oluşturur.

Başka bir işlem aynı Web hizmette kullanmak için form şablonunu yapılandırın veya tamamen farklı bir Web hizmetinden kullanmak istediğiniz form şablonunu ikincil veri bağlantıları ekleyebilirsiniz. Bir ikincil veri bağlantısını bu sorguları veri eklediğinizde, InfoPath alanları ve Web hizmeti şema eşleşen gruplarıyla ikincil veri kaynağı oluşturur. Veri gönderen bir ikincil veri bağlantısını eklerseniz, formunda parametreler için Web hizmeti bağlı olarak, tüm göndermek için bağlantı veya yalnızca bazı verilerin yapılandırabilirsiniz.

Bir Web hizmeti için bir ana veya ikincil veri bağlantısı oluşturduğunuzda, bağlantı yalnızca veriler, yalnızca veri ya da her iki sorguları gönderir verileri sorgulayan ve olup olmadığını belirtebilirsiniz. Veri bağlantısı sorgular, InfoPath form şablonuna sorgu Çalıştır ekler. Bir kullanıcı Sorguyu Çalıştır düğmesini tıklattığında, InfoPath Web Hizmeti sorgu alanlarına verileri içeren bir sorgu gönderir. Veri bağlantısı gönderen InfoPath form için Gönder özelliği sağlar. Veri gönderme bağlantısı yapılandırdığınızda, InfoPath Web hizmeti tarafından hangi verilerin gerekli belirler. Bu bilgileri temel alarak, hangi formda alanlar belirtebilirsiniz şablonu verilerini Web hizmetine gönderme.

Belge kitaplığı veya bir SharePoint sitesinde liste

Form verilerini belge kitaplığı veya liste Windows SharePoint Services çalıştıran bir sunucuda ikincil veri bağlantısı üzerinden sorgulayabilirsiniz. Form ayrıca sunucuda bir belge kitaplığına veri gönderebilirsiniz. Bir kitaplık veya listeyi ana veri bağlantısı üzerinden bağlanamıyorsunuz.

Bir ikincil veri bağlantısını sorgular verilerin bir belge kitaplığı veya liste oluşturursanız, InfoPath ikincil veri kaynağı için belge kitaplığı veya liste sütunları eşleşen formu oluşturur.

Belge kitaplığı veri gönderen bir ikincil veri bağlantısı oluşturma ve bu gönderme veri bağlantısı gönderme ana form şablonu için eylem olmasını istiyorsanız, form şablonu için Gönder özelliğini etkinleştirmek ve veri ile ilişkilendirmeniz gerekir Gönderme Seçenekleri iletişim kutusunda (Araçlar menüsü, Gönderme Seçenekleri komutu) kullanarak bağlantı. Varsayılan olarak, tüm veriler formunda gönderildi veri gönderme bağlantısı. Verilerin yalnızca bir bölümünü göndermek istiyorsanız, form şablonu için özel kod yazarak bunu yapabilirsiniz.

XML dosyası

Form verilerini XML dosyasını bir ikincil veri kaynağı bağlantısı üzerinden sorgulayabilirsiniz. Örneğin, bir Microsoft Office Excel çalışma XML dosyası olarak kaydedin ve sonra ikincil veri bağlantısı sorgu ve formda o dosyasındaki verileri görüntülemek için kullanın. De ikincil veri bağlantısı için sorgu verileri bir XML dosyasındaki XML, bir Microsoft ASP.NET uygulaması, sık karşılaşılan ağ geçidi Arabirimi(cgı) komut dosyası veya kullanan bir uygulama gibi döndüren bir Web sunucusuna bir uygulamadan veri almak için kullanabilirsiniz Internet sunucusu uygulama programlama arabirimi (ISAPI).

Bir Web sunucusuna uygulama

ASP.NET uygulaması, bir CGI komut dosyası veya ISAPI kullanan bir uygulama gibi bir Web sunucusuna bir uygulamaya veri gönderen bir ikincil veri bağlantısı oluşturabilirsiniz. Bir Web sunucusuna bir uygulamaya veri göndermek için kullanıcıların kendi form verilerini gönderme ve Web sunucusu (HTTP) seçerek içinde Gönderme Seçenekleri iletişim kutusunda (veri bağlantısı için Gönder seçeneklerini yapılandırma izin vermek için form şablonunu yapılandırma Araçlar menüsünde, Gönderme Seçenekleri komutu).

Not: Form Web sunucusunda bir uygulamaya veri gönderen tek bir veri bağlantısı olabilir. Bir Web sunucusuna bir uygulamaya veri göndermek için kural kullanmak formlar izin vermek için form şablonunu yapılandırın yapamazsınız.

Veri bağlantısı kitaplığındaki ayarları bağlantısı

Birkaç form aynı veya benzer veri bağlantılarını kullanırsanız, her veri bağlantısı için ayarları Office SharePoint Server 2007çalıştıran bir sunucuda veri bağlantısı dosyası veri bağlantısı kitaplığındaki depolamak göz önünde bulundurun. Veri bağlantı dosyası için tek bir dış veri kaynağı bağlantı bilgilerini içeren ve .xml veya .udcx bir dosya adı uzantısına sahip bir XML dosyasıdır. Kullanıcı bir veri bağlantısı dosyasına bağlanan bir form açtığında, InfoPath dış veri kaynağına bağlanmak için o dosyada ayarları kullanır. Veri bağlantısı dosyaları kullanmanın avantajları şunlardır:

  • Böylece sıfırdan her form için aynı veri bağlantısı oluşturmak için gerek yoktur, aynı veri bağlantısı dosyası birden çok form kullanabilirsiniz.

  • Dış veri kaynağı konumu veya bağlantı ayarlarını değiştirirseniz, yalnızca veri bağlantısı dosyası, değil her form şablonunu güncelleştirmeniz gerekir.

  • Veri bağlantısı dosyası kullanıcı tarayıcıyı kullanarak bir form doldururken, sunucu tarafından kullanılabilen alternatif kimlik bilgileri içerebilir.

  • Tüm veri bağlantılarını formunda veri bağlantısı dosyalarını kullanıyorsanız out doldurulur formları tam güven güvenlik düzeyini olmadan bir tarayıcıda başka bir etki alanında bir bilgisayara bağlanabilirsiniz.

Form veri bağlantı dosyasına bağlanmak için dosyayı bir veri bağlantısı kitaplığı Office SharePoint Server 2007 çalıştıran bir sunucuda depolanması gerekir ve evrensel veri bağlantısı (UDC) sürüm 2.0 dosya biçimi izlemeniz gerekir.

Not: UDC 2.0 dosya biçimi 1.0 biçimi Microsoft Office FrontPage tarafından kullanılan sürümü bir üst kümesidir. InfoPath veri bağlantısı dosyası sürüm 1.0 biçimi olarak kullanamazsınız. Ayrıca bkz bölümünde veri bağlantısı kitaplıkları ve veri bağlantısı dosyaları hakkında daha fazla bilgi için bağlantılar bulabilirsiniz.

Sayfanın Başı

Daha fazla yardıma mı ihtiyacınız var?

Daha fazla seçenek mi istiyorsunuz?

Abonelik avantajlarını keşfedin, eğitim kurslarına göz atın, cihazınızın güvenliğini nasıl sağlayacağınızı öğrenin ve daha fazlasını yapın.

Topluluklar, soru sormanıza ve soruları yanıtlamanıza, geri bildirimde bulunmanıza ve zengin bilgiye sahip uzmanlardan bilgi almanıza yardımcı olur.

Bu bilgi yararlı oldu mu?

Dil kalitesinden ne kadar memnunsunuz?
Deneyiminizi ne etkiledi?
Gönder’e bastığınızda, geri bildiriminiz Microsoft ürün ve hizmetlerini geliştirmek için kullanılır. BT yöneticiniz bu verileri toplayabilecek. Gizlilik Bildirimi.

Geri bildiriminiz için teşekkürler!

×