This past week I was implementing an "evolving" solution for a client that uses BDC and SPQuery and ran into some difficulty using SPQuery against a document library containing folders. Behean line: assign "recursive" bilaketara atributua ikuspegian.
Nire agertokia:
- Astelehenean, Dokumentu bat igo dut, eta meta-datu batzuk hornitzeko.
- Ondorengo astean, I upload a new document. Much of this new document’s meta data is based on the document I uploaded on Monday (which we call the "master document").
- Sortu dugu, web-zerbitzu fatxada duten BDC errespetatzen interfaze bat eskaintzen du zerrenda hori, beraz, erabiltzaileek erraz kokatzeko Astelehena dokumentua izenburua bilaketa baten bitartez.
- A BDC data column provides a friendly user interface. (Hau nire saiakera parte da BDC erabiliz Lookup gehiago errespetatzen zutabean at).
Amaierako BDC fatxada kontsulta zerbitzu bat erabiltzen du horrelako bilaketak egiteko:
// Erabiltzen U2U tresna CAML kontsulta hau sortzen lagundu. oQuery.Query = "<Non>"; bada (titleFilter.Length > 0) oQuery.Query = " <Eta>"; oQuery.Query = " <Eta>" + " <Geq>" + " <FieldRef Name=\"DocumentId\" />" + " <Value Type=\"Text\">" + MinID + "</Balio>" + " </Geq>" + " <Leq>" + " <FieldRef Name=\"DocumentId\" />" + " <Value Type=\"Text\">" + maxId + "</Balio>" + " </Leq>" + " </Eta>"; bada (titleFilter.Length > 0) oQuery.Query = " <Dauka>" + " <FieldRef Name=\"Title\" />" + " <Value Type=\"Text\">" + titleFilter + "</Balio>" + " </Dauka>" + " </Eta>"; oQuery.Query = "</Non>";
Garapenaren hasierako fasean, this worked great. Hala eta guztiz ere, karpetak sartu dugu direktorioa arazo batzuk konpontzeko, eta bat-batean, my BDC picker wouldn’t return any results. I tracked this down to the fact that the SPQuery would never return any results. We used folders primarily to allow multiple files with the same name to be uploaded but with different meta data. When the file is uploaded, zerrenda-elementua ID oinarritutako karpeta bat sortuko dugu, eta ondoren fitxategia eraman (Idatzi dut hemen; izan dugu mistoak emaitzak Planteamendu honekin, baina, oro har,, ondo ari da lanean). The user don’t care about folders and in fact, don’t really understand that there are any folders. We have configured all the views on the library to show items without regard to folders.
I hit this problem twice as the technical implementation evolved and solved it differently each time. The first time, I wasn’t using the CONTAINS operator in the query. Without a CONTAINS operator, I was able to solve the problem by specifying the view on the SPQuery’s contructor. Instead of using the default constructor:
SPList oList = web.Lists["Documents"];
SPQuery oQuery = berria SPQuery();
Ordez erabiltzen dut eraikitzaile bat zehaztu ikuspegi bat:
SPList oList = web.Lists["Documents"];
SPQuery oQuery = berria SPQuery(oList.Views["All Documents"]);
Hori arazoa konpondu eta nire emaitzak lortzeko hasi nintzen.
I then added the CONTAINS operator into the mix and it broke again. It turns out that the CONTAINS operator, orain arte bezala dizut, ez du ikuspegian lan egiteko modu berean bat GEQ errazagoa gisa / LEQ operators. I did some searching and learned that the query’s ViewAttributes should be set to "Recursive", bezala:
oQuery.ViewAttributes = "Scope=\"Recursive\"";
That solved the problem for CONTAINS. Izan ere,, hori ere konpondu nire jatorrizko bilaketa, arazo eta nuen zehazten recursive atributua lehenengo aldiz, Dut, ez luke alean sartu exekutatu berriro.
Izan ere, ikuspegi oinarritutako SPQuery bat operadore batzuen lanak (GEQ/LEQ) eta ez beste batzuk (CONTIENE), Izan ere, gero KPIs hori ez dirudi lan guztiak karpeta duten dokumentu liburutegi batekin eramaten uste SPQuery duela orthogonality gai batzuk ninduen.
Berezia esker:
- Ona Folks at U2U eta beren kontsulta-tresna.
- Michael Hoffer handia "egiten ikasteko" blog post, iruzkinak eta erantzunak.
</amaiera>
http://www.batteryfast.co.uk/asus/w3v.htm ASUS w3v bateria,
http://www.batteryfast.co.uk/asus/w3000a.htm asus w3000a battery,
http://www.batteryfast.co.uk/asus/w3000.htm ASUS w3000 bateria,
http://www.batteryfast.co.uk/asus/w3000v.htm ASUS w3000v bateria,
http://www.batteryfast.co.uk/asus/a31-s5.htm ASUS A31-S5 bateria,
http://www.batteryfast.co.uk/asus/a32-s5.htm ASUS a32-S5 bateria,
http://www.batteryfast.co.uk/asus/s52n.htm ASUS s52n bateria,
http://www.batteryfast.co.uk/asus/s5000.htm ASUS S5000 bateria,
http://www.batteryfast.co.uk/asus/s5200n.htm ASUS s5200n bateria,
http://www.batteryfast.co.uk/asus/s5n.htm ASUS s5n bateria,
http://www.batteryfast.co.uk/asus/90-naa1b1000.htm ASUS 90 naa1b1000 bateria,
http://www.batteryfast.co.uk/asus/s2691061.htm ASUS s2691061 bateria,
http://www.batteryfast.co.uk/asus/a42-v6.htm Asus a42-V6 bateria,
http://www.batteryfast.co.uk/asus/a32-u5.htm ASUS a32-u5 bateria,
http://www.batteryfast.co.uk/asus/u5f.htm ASUS u5f bateria,
http://www.batteryfast.co.uk/asus/u5a.htm ASUS bateria U5A,
http://www.batteryfast.co.uk/asus/u5f.htm ASUS u5f bateria,
http://www.batteryfast.co.uk/asus/u5.htm ASUS U5 bateria,
http://www.batteryfast.co.uk/compaq/nw8000.htm Compaq nw8000 bateria,
http://www.batteryfast.co.uk/compaq/nc8000.htm Compaq nc8000 bateria,
http://www.batteryfast.co.uk/compaq/v1000.htm Compaq v1000 bateria,
http://www.batteryfast.co.uk/compaq/nc6000.htm Compaq nc6000 bateria,
http://www.batteryfast.co.uk/compaq/nx5000.htm Compaq nx5000 bateria,
http://www.batteryfast.co.uk/compaq/n600.htm Compaq n600 bateria,
http://www.batteryfast.co.uk/compaq/n600c.htm Compaq n600c bateria,
http://www.batteryfast.co.uk/compaq/n610c.htm Compaq n610c bateria,
http://www.batteryfast.co.uk/compaq/n610v.htm Compaq n610v bateria,
http://www.batteryfast.co.uk/compaq/n620c.htm Compaq n620c bateria,
http://www.batteryfast.co.uk/compaq/e500.htm Compaq e500 bateria,
http://www.batteryfast.co.uk/compaq/e500s.htm Compaq e500s bateria,
http://www.batteryfast.co.uk/compaq/v300.htm Compaq v300 bateria,
http://www.batteryfast.co.uk/compaq/v500.htm Compaq v500 bateria,
http://www.batteryfast.co.uk/compaq/pp2060.htm Compaq pp2060 bateria,
http://www.batteryfast.co.uk/compaq/nx9000.htm Compaq nx9000 bateria,
http://www.batteryfast.co.uk/compaq/nx9005.htm Compaq nx9005 bateria,
http://www.batteryfast.co.uk/compaq/nx9010.htm Compaq nx9010 bateria,
http://www.batteryfast.co.uk/compaq/nx9020.htm Compaq nx9020 bateria,
http://www.batteryfast.co.uk/compaq/n110.htm Compaq n110 bateria,
http://www.batteryfast.co.uk/compaq/n110s.htm Compaq n110s bateria,
http://www.batteryfast.co.uk/compaq/pp2101x.htm Compaq pp2101x bateria,
http://www.batteryfast.co.uk/compaq/presario-2100.htm Compaq presario 2100 bateria,
http://www.batteryfast.co.uk/compaq/ze4000.htm Compaq ze4000 bateria,
http://www.batteryfast.co.uk/compaq/f4809a.htm Compaq f4809a bateria,
http://www.batteryfast.co.uk/compaq/f4812a.htm Compaq f4812a bateria,
http://www.batteryfast.co.uk/dell/inspiron-700m.htm dell inspiron 700m bateria,
http://www.batteryfast.co.uk/dell/inspiron-710m.htm dell inspiron 710m bateria,
http://www.batteryfast.co.uk/dell/latitude-x200.htm dell latitude x200 bateria,
http://www.batteryfast.co.uk/dell/8u443.htm dell bateria 8u443,
http://www.batteryfast.co.uk/dell/312-0058.htm dell 312-0058 bateria,
StringBuilder ezagutzen duten onena luze kateak sortzeko praktika daukazu, eskubidea?