Qeb Archives: BDC

Nreeb taub: BDC ADF Version tooj yog koj cov phooj ywg

Yog koj nyob nraum tes-coding ADF ntaub ntawv thiab ua chaws/ntshuam/kuaj mus ntau ntau, siv tus xov tooj version yuav ua rau koj lub neej yooj yim.

Kuv yuav lees nws ntxub, tab sis, txog rau lub lim tiam no, Kuv twb yeej Hmong cov ADF thiab rov importing nws. Qhov no yuav tawg kuv ua lag ua luam cov ntaub ntawv txhua thiab ua rau kuv rov wire lawv. Tag nrho ruaj.

Daim ntawv no nyob rau hauv "yog cuab kev thaum koj pom nws".

Piv txwv:

<LobSystem
xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-lom" xsi:schemaLocation="http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Hom="WebService" Version="1.2.0.0" Lub npe="xyzzyDocumentReview" xmlns="http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalog">

Tias version thiab rov import thiab ib lub lag luam cov ntaub ntawv sab siv kho tshiab cov version yeej uas tsis muaj ntxiv configuration yuav tsum tau hloov.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

Kua: BDC Picker qhia tau hais tias tsuas muaj ib sab ntawm lub ntsiab

Hauv kuv npaj siab rau mus ntawm kev muab ib pab tau ntau lookup sab siv BDC, Kuv ntaus ib phab ntsa nrog rau lub BDC picker. Yog hais tias koj tsis tau pom nws, cov BDC picker yog zoo li ib tug neeg picker tsuas tias nws ua haujlwm nrog rau txhua yam "lag luam cov ntaub ntawv".

Koj saib tau cov picker los txhaj rau lub icon qhib phau ntawv uas qhia tus lag luam cov ntaub ntawv kiag li:

duab

Cov duab saum toj no qhia tau hais tias ib lub lag luam cov ntaub ntawv kem hu ua "Tswv daim ntawv Id". Qhia kiag qhov txuas nrog, ntawm BDC, rau qhov Web site. Cov Web site qhov rov txhua ob lus: Daim ntawv ID thiab Title. Tus ua hauj lwm ntawm no yog muab ib "daim ntawv no yog xyuas los ntawm" muaj nuj nqi. Cov neeg siv xaiv ib tug "tswv" ntaub ntawv thiab thaum lawv tseg, ib qhov kev tshwm sim receiver copies meta liaj teb cov ntaub ntawv los ntawm tus tswv tsuav.

Los vim, cov BDC picker zoo li no thaum kuv nrhiav kom tau ib qho ntaub ntawv uas nws daim ID = "38":

clip_image002

Tus ntawd yog yuav pab tau, tab sis tsis zoo txaus. Neeg tsis xav saib raws tawm lawv tus ID, lawv xav hais tias ntawd lub npe thiab/los yog lwm yam ntaub ntawv meta. Tus picker no tso cai rau koj mus nrhiav tau rau ntawm lwm txhua (e.g. Npe) tab sis yuav tsis qhia tau tias daim ntawv ntawm lub npe uas nws pom tseeb, tos lawv DocId tus li no:

clip_image002[1]

(Txhaj tshuaj ntsuam tsis zoo li ntawd, vim kuv tsis de mus nrhiav rov rau tej kev ntsuam mhuv, tab sis koj pom tau tias yog nws tau pom ib co ntsiab, nws yuav tsuas pom tus DocId, tsis tau muaj lub npe).

High tsis nrhiav rau lo lus teb rau qhov no thiab ua tsis tau tejyam. Kuv colleague, lub venerable Jonathan Bradshaw, muaj muag thiab solved no qhov teeb meem. Thaum kuv mus txog nws tau kev pab, Nws taw kuv ua raws li siab xav.

Configure lub picker qhia ntau txhua ntawm "ShowInPicker cov" cov cuab yeej nyob hauv lub ADF:

<Khoom Lub npe="ShowInPicker" Hom="System.Boolean">tseeb</Khoom>

Nyob rau ntau yam:

  <!-- Npe -->
  <TypeDescriptor TypeName="System.String" Lub npe="Npe" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Npe</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Khoom>
      <Khoom Lub npe="DisplayByDefault" Hom="System.Boolean">tseeb</Khoom>
      <Khoom Lub npe="ShowInPicker" Hom="System.Boolean">tseeb</Khoom>
    </Khoom>
  </TypeDescriptor>

Teev cov cuab yeej no ua kom paub cov teeb meem me. Thaum koj teev nws ib zaug, koj yuav tsum muab tso rau txhua sab koj yuav tau qhia. Hauv kuv tsev neeg, BDC picker tsom DocId yog vim. Txawm li cas los, ib zaug kuv ntxiv "ShowInPicker" rau npe, DocId tsis tso tawm kom pom. Kuv solved uas los ntawm ntsees teev cov cuab yeej ShowInPicker rau Doc ID.

Ntawm no yog cov:

duab

(Kuv mam li piav qhov odd-looking "168 – CamlSchema.xsd" siv hauv lub tsev xa blog yav tom ntej. Hauv ntej, Nws yog ib txoj hlua concatenated pub rau cov neeg siv kev zoo me ntsis).

tau mas, daim ntawv no qhov nkag teb chaws blog, Kuv cia li tsis nrhiav ib tug "ShowInPicker" ua heev heev hits, xws li cov no ib: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. Nws qhia txog lub ntsiab ntawm qhov cuab yeej nrog rau ib co lwm zoo BDC khoom.

</kawg>

Subscribe rau kuv blog!

Ntawv cim npe Technorati:

Tshuaj tsis ua hauj lwm ntshuam BDC ADF: “Qhov yuam kev no tshwm sim:”

Kuv muaj dua ib zaug crafting BDC ADF cov ntaub ntawv ntawm tes (kom kuv tau tsim kuv "• Get off kuv nyom!" cred) thiab ntaus no tus ntxim hlub yuam kev:

duab

"Thov txhais ntshuam tejyam. Qhov yuam kev no tshwm sim:"

Raws li koj tau pom, yog ib qho kev ua yuam kev, tab sis npog … nws tsis yuav kom koj qhia kuv yog vim li cas nws yog.

Hauv kuv tsev neeg, qhov no muab tias kuv twb pib nrog ib ADF rau lub txawv tus peb tes num uas txuas nrog lub database thiab sau tau ib cov lus nug SQL tiv thaiv ib saib tej qhov chaw. Hauv no yog ib qhov tshiab, Kuv hu ib tug qauv ntawm qhov Web site. Kuv muaj stripped tawm tus DB hom khoom thiab ntxiv kuv qhov Web site rau khoom, tab sis tsis tau tejyam uas hloov lub <LobSystem>lub hom attribute. Kuv switched nws mus "WebService" thiab kuv kaj siab lug mus rau newer thiab ntau exciting ntshuam uas tsis, uas tau licas hauv due kiag.

Ntawm no yog tus LobSystem lawm:

<LobSystem
xmlns:xsi =http://www.w3.org/ 2001/XMLSchema-lom
xsi:schemaLocation =http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Yam = "Database"
Version = "1.0.0.0" Lub npe = "xyzzy"
xmlns ="
http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalog">

Qhov no yeej muaj tseeb:

<LobSystem
xmlns:xsi =http://www.w3.org/ 2001/XMLSchema-lom
xsi:schemaLocation =http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Yam = "WebService"
Version = "1.0.0.0" Lub npe = "xyzzy"
xmlns ="
http://schemas.Microsoft.com/Office/2006/03/BusinessDataCatalog">

</kawg>

Ntawv cim npe Technorati:

BDC nkawd muaj kev hloov zaum rau Lookups

HLOOV TSHIAB: No lub posting MSDN muaj ib co kev nthuav tswvyim ntawm JXJ raws li nws, mas tsis zoo, yaam puab paub mus nram no txog kev: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2623565&SiteID=1

Peb muaj ib lub lag luam scenario qhov uas peb yuav tsum txuas ob qiv ntaub ntawv ntawm ib qho "daim ntawv ID" teb.

Peb nquag siv ib sab lookup mus qiv mus li no. Muaj ntau ntau lub drawbacks los lookup txhua, peb cov uas muaj:

  1. Yuav tsum txuas tsuas muaj ib sab ntawm lub tsev qiv ntawv lookup lookup.
  2. Kev kawm: Cov tsev qiv ntawv los yuav muaj 175,000 nkag. Yog ntau nkag hauv lub lookup.
  3. Nrhiav: Yog tsis nrhiav integrated. Kuv tsis txhais hais tias hauv qhov txiav txim zoo NTXHUAB tshawb, tiam sis yog tsis muaj txoj kev los mus nrhiav / lim rau ntau txhua los ntawm lub tsev qiv ntawv qhov ntaub ntawv thiab nrhiav cov txuas koj xav.

Backed los BDC, peb yuav siv tus "lag luam ntawv" hom qhia kiag thiab nws muab ib superior nrhiav thiab twb pub ntau txhua cov ntaub ntawv no tshwm nyob rau hauv daim ntawv teev views.

Puas muaj tej yam ua ntej zoo nrog kauj thiab npaj rau kev sau ntawv tshaj txog nws.

Yog hais tias koj twb ua hauj lwm no lub ua ntej thiab yuav tsum muaj tej lus, thov koj qhia!

</kawg>

Ntawv cim npe Technorati:

Kua rau BDC ntshuam yuam kev: “Yuav tsis thauj tej piav los TypeDescriptor tus TypeName …”

Kuv twb tau nrog ua hauj lwm BDC hnub no, coding ADF cov ntaub ntawv yog xuas tes ntxuav thiab generating kuv tus kheej ib txhia uas tsis. Zoo li no yuam kev ib:

Thov txhais ntshuam tau tejyam. Qhov yuam kev no tshwm sim: Yuav tsis thauj tej piav los TypeDescriptor tus TypeName. Parameter npe: ces yuav yuam kev typeName yog tsum nyob los yog ua ntej kab: ' 35’ thiab ua tib: '20'.

Tso tawm kom NTXHUAB pom qhov yuam kev no thaum kuv sim import ADF XML ntawv.

Researched lub Internets thiab pom tias kuv yog referencing LOB lom lub npe (los ntawm cov <LobSystemInstance>) nyob hauv kuv <TypeDescriptor> ntawm hais kuv yuav tsum tau muaj los lub npe LOB xwb (ntawm <LobSystem>).

Tsis ncaj ncees lawm:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB lom npe" Lub npe = "KeyValue">

Kho:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB npe" Lub npe = "KeyValue">

Vam tias tej no yog ib yam neeg teev los yog ob lub sij hawm.

</kawg>

Subscribe rau kuv blog!

Ntawv cim npe Technorati:

Yuam ib tug BDC runtime kev piav

Kuv los yuam ib tug BDC kev no lub limtiam uas manifested nws tus kheej rau cov neeg siv interface thiab ua tus 12 nas muv cav Thaum runtime.

Ua ntej, qhov no nyob hauv cov neeg interface:

Kuj tsis paub liaj teb mus tau ntxig yaam tseem ceeb txhua lub Identifier nuav los yog txim tuag SpecificFinder MethodInstance nrog lub npe … Xyuas input tsis tau nrog txhua Identifier uas sau tseg rau qhov chaw no TypeDescriptors.

Ntawm no yog ib qho screen txhaj:

clip_image001

Kuv tseem ua txoj xov tshwm nyob rau lub 12 nas muv ca thaum yuav (siv kuv patented high-tech-don't-try-this-at-home uas "mysterious tsis" txujci):

11/14/2007 09:24:41.27 w3wp.exe (0x080C) 0x0B8C SharePoint Portal neeg rau zaub mov ua lag ua luam cov ntaub ntawv 6q4x High kos hauv BusinessDataWebPart.OnPreRender: System.InvalidOperationException: Cov nqi no Identifier ”, yam ”, yog invalid. Xav pom Identifier tus nqi rau cov hom 'System.String'. tom Microsoft.Office.Server.ApplicationRegistry.MetadataModel.Entity.FindSpecific(Nruas[] subIdentifierValues, LobSystemInstance lobSystemInstance) tom Microsoft.SharePoint.Portal.WebControls.BdcClientUtil.FindEntity(Qhov chaw qhov chaw, Nruas[] userValues, LobSystemInstance lobSystemInstance) tom Microsoft.SharePoint.Portal.WebControls.BusinessDataItemBuilder.GetEntityInstance(Saib desiredView) tom Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.GetEntityInstance() tom Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.SetDataSourceProperties()

Kuv nrhiav ib ncig thiab nrhiav tau tej yam ua nyob rau hauv lub Rooj sab laj MSDN, tab sis lawv tsis txaus kuv nkag siab kuv yog ua dab tsis ncaj ncees lawm. Kuv saib ib webcast los Ted Pattison uas kuv niaj hnub muaj squirreled mus rau ib tug neeg rau zaub mov thiab tuaj kom paub kuv qhov teeb meem.

Nyob rau hauv kuv ADF, Kuv yuav siv rau ib SQL database li:

            <Khoom Lub npe="RdbCommandText" Hom="System.String">
              <![CDATA[
                XAIV SETID, CARRIER_ID, EFFDT, DESCR, EFF_STATUS, TAXPAYER_ID, NETWORK_ID, FRT_FORWARD_FLG, ALT_NAME1, ALT_NAME2, LANGUAGE_CD,
                      LUB TEB CHAWS, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, LUB ZOS, NUM1, NUM2, HOUSE_TYPE, ADDR_FIELD1, ADDR_FIELD2, ADDR_FIELD3,
                      CHEEB NROOG, LUB XEEV, KOJ, GEO_CODE, IN_CITY_LIMIT, COUNTRY_CODE, XOV TOOJ, EXTENSION, FAX MUS, LAST_EXP_CHK_DTTM, FREIGHT_VENDOR,
                      INTERLINK_DLL, TMS_EXCLUDE_FLG los dbo.PS_CARRIER_ID_VW nrog (nolock)
                QHOV TWG
                  (SETID <> 'FEEM') thiab
                  (qis(CARRIER_ID) >= sab(@MinId)) thiab
                  (qis(CARRIER_ID) <= sab(@MaxId)) thiab
                  (qis(DESCR) NYIAM sab(@InputDescr))
                ]]>
            </Khoom>

Kuv tau muab qhov SQL los ntawm ib tug neeg DBA thiab kuv muab kuv mus nkag siab hais tias nws yog ib tug tshwj xeeb saib lawv tsim cia rau kuv. Cov yuam sij nws yog CARRIER_ID.

Ntawm no yog cov yoov nkag tau kuv:

      <Identifiers>
        <Identifier Lub npe="CARRIER_ID" TypeName="System.String" />
        <Identifier Lub npe="DESCR" TypeName="System.String" /> 
</Identifiers>

Qhov chaw nyob ntawm kab, Kuv tswj tau rau kuv tus kheej lawm lub ntsiab ntawm yam <Identifiers> thiab ntxiv DESCR txawm tias tsis tau ib identifier. Kuv muab DESCR lub teeb identifiers thiab presto! Nws cov ua haujlwm.

I hope this saves someone some grief 🙂

Ntawv cim npe Technorati: , , ,

BDC ADF thiab koj cov phooj ywg, CDATA

Kuv twb pom tej yam ua tau txawv txawv thiab ruaj tes-encoding RdbCommandText nyob hauv ib co piv txwv ntawm cov (xws li lwm cov ntaub ntawv MSDN).

Kuv xav taw tes rau cov tuaj tshiab rau BDC tias commands yuav muab qhwv hauv ib CDATA lossis nyob rau "natural lawv" daim ntawv. Li ntawd, qhov kev siv ua tau txawv txawv:

<Khoom Lub npe="RdbCommandText" Hom="System.String">
QHO dbo.MCRS_SETTLEMENT.ID, dbo.MCRS_SETTLEMENT.Settlement los ntawm dbo.MCRS_SETTLEMENT
QHOV TWG (tus ID &gt;= @MinId) THIAB (tus ID &LT;= @MaxId)
</Khoom>

uas muaj yeej yuav zoo dua tuaj li no:

<Khoom Lub npe="RdbCommandText" Hom="System.String">
<![CDATA[
QHO dbo.MCRS_SETTLEMENT.ID, dbo.MCRS_SETTLEMENT.Settlement los ntawm dbo.MCRS_SETTLEMENT
QHOV TWG (tus ID >= @MinId) THIAB (tus ID <= @MaxId)
]]>
</Khoom>

</kawg>

BDC Primer

Intro mus BDC

Tej cov piv txwv: BDC ADF uas yog connects los SQL database nrog embedded cov neeg siv tus id thiab lo lus zais

Kuv xav tau los hlau tuaj NTXHUAB rau ib SQL database ntawm BDC. Rau kev tshuaj ntsuam txog/POC, Kuv xav mus embed rau SQL tus account neeg tus id thiab lo lus zais rau hauv cov ADF. Pib nrog no template (http://msdn2.microsoft.com/en-us/library/ms564221.aspx), Kuv tsim ib ADF connects rau ib tug SQL neeg rau zaub mov lom thiab logs tau maub ib hais neeg tus id thiab lo lus zais thiab qhia hauv no snippet:

  <LobSystemInstances>
    <LobSystemInstance Lub npe="ClaimsInstance">
      <Khoom>
        <Khoom Lub npe="AuthenticationMode" Hom="System.String">PassThrough</Khoom>
        <Khoom Lub npe="DatabaseAccessProvider" Hom="System.String">SqlServer</Khoom>
        <Khoom Lub npe="RdbConnection tej ntaub ntawv tau qhov twg los" Hom="System.String">serveractual txoos lom</Khoom>
        <Khoom Lub npe="RdbConnection thaum Catalog" Hom="System.String">nqi pib catalog</Khoom>
        <Khoom Lub npe="RdbConnection kev ruaj ntseg" Hom="System.String">SSPI</Khoom>
        <Khoom Lub npe="RdbConnection Pooling" Hom="System.String">tsis tseeb</Khoom>

        <!-- Cov no yog cov tseem ceeb hauv qhov tseem ceeb: -->
        <Khoom Lub npe="Cov neeg siv RdbConnection ID" Hom="System.String">ib tugctual neeg ID</Khoom>
        <Khoom Lub npe="RdbConnection Password" Hom="System.String">txoos Password</Khoom>
        <Khoom Lub npe="RdbConnection Trusted_Connection" Hom="System.String">tsis tseeb</Khoom>

      </Khoom>
    </LobSystemInstance>
  </LobSystemInstances>

Nws tseem tsis tau muaj kev xyaum zoo tshaj, tiam sis nws tseem pab tau rau ib txoj kev sai thiab yooj yim configuration kev soj ntsuam. Qhov no kuj ceeb tias yooj yim paub. Kuv yeej tsis pom ib tug piv txwv tej qhov chaw uas nrhiav keywords:

  • adf kev userid thiab lo lus zais
  • embed neeg tus id thiab lo lus zais rau hauv adf
  • embed neeg tus id thiab lo lus zais rau hauv adf bdc
  • sharepoint bdc primer
  • sharepoint embed neeg tus id thiab lo lus zais rau hauv adf

</kawg>

Subscribe rau kuv blog.