Sa pase nan semèn ki te aplike yon "en" solisyon pou yon kliyan an ki itilize BDC ak SPQuery la te nan kèk difikilte pou itilize SPQuery kont yon dokiman bibliyotèk ki genyen dossiers. Branch bouton an: Deziyen yon "récursive" pou tout kalite vi de la requête.
M' scénario:
- Nan Lendi, Mwen téléchargement yon dokiman Et founi kèk done meta.
- Semèn sa a, Mwen téléchargement yon nouvo dokiman. Anpil nan enfòmasyon meta dokiman nouvo sa a te baze sou dokiman an mwen chargé nan Lendi (sa nou rele "mèt dokiman an").
- Nou te kreye yon façade sèvis nan entènèt ki founi yon entèfas BDC zanmi pou lis la lè sa a, les fasil kapab jwenn sa dokiman Lendi via recherche tit yon.
- Yon kolòn done BDC bay yon entèfas kap itilize li an zanmi. (Sa se pati pou m' ta vle nan itilize BDC pou yon kolòn plis convivial Recherche).
Dènye BDC façade sèvis la, ki itilize yon requête kon sa pou yo fè la recherche:
// Te itilize U2U konnen si yon moun pou kouche génération requête CAML sa a. oQuery.Query = "<Kote>"; Si (titleFilter.Length > 0) oQuery.Query = " <Et>"; oQuery.Query = " <Et>" + " <Geq>" + " <Non FieldRef = "DocumentId" />" + " <Valeur tip = "Text">" + minId + "</Valè>" + " </Geq>" + " <Leq>" + " <Non FieldRef = "DocumentId" />" + " <Valeur tip = "Text">" + maxId + "</Valè>" + " </Leq>" + " </Et>"; Si (titleFilter.Length > 0) oQuery.Query = " <Contient>" + " <Non FieldRef = "Title" />" + " <Valeur tip = "Text">" + titleFilter + "</Valè>" + " </Contient>" + " </Et>"; oQuery.Query = "</Kote>";
Pandan premye sèn nan developman, sa te travay anpil. Sepandan, nou a dossiers nan anyè a pou rezoud pwoblèm kèk Et vif/frèt, sélecteur BDC mwen pa retounen nan kèk rezilta yo. Mwen UN sa a sou Lefèt ke SPQuery la ta pwal retounen pa janm gen rezilta yo. Nou itilize dossiers premyèman pou pèmèt miltip fichiers avèk menm non pou fè chargé, men ak lòt done meta. Lè dokiman an chargé, nou kreye yon Katab ki baze sou Didantite atik lis Et puis déplacer dokiman an gen (Mwen te ekri osijè de sa Isit; nou te gen rezilta mixte ak apwòch sa a, men sou tout, sa travay byen). Moun kap itilize li an pa swen osijè de dossiers yo ak nan, pa vrèman konprann ke genyen okenn dossiers. Nou te configuré tout lide sou bibliyotèk la pou montre atik without regard to dossiers.
M frape de fwa kòm teknik aplikasyon a, ki te evolye ak rezoud li yon lòt jan chak fwa pwoblèm sa a. Premye fwa, M pa t ap itilize operatè CONTIENT a nan la requête. San yon operatè CONTIENT, Mwen pa t ' kapab rezoud pwoblèm pa spécifiant vi a sou SPQuery la contructor. Olye ke yo ap itilize a constructeur defo:
Splist.update() oList = web.Lis["Dokiman"];
SPQuery oQuery = nouvo SPQuery();
Mwen te itilize olye de yon constructeur ki te afiche yon vi:
Splist.update() oList = web.Lis["Dokiman"];
SPQuery oQuery = nouvo SPQuery(oList.Views["Tout dokiman"]);
Pou rezoud pwoblèm ak mwen te kòmanse chache m' rezilta yo.
Mwen lè sa a te ajoute ke operatè CONTIENT a nan melanj la e li gen yon k kase ankò. Li vire akote ke operatè CONTIENT a, Se poutèt sa mwen kapab di, pa travay avèk vi a menm jan ak a yon GEQ plus / Operatè LEQ. Mwen te fè chache kèk e te apwann ke ViewAttributes la requête ta dwe tabli pou "Récursive", menm jan nan:
oQuery.ViewAttributes = "Portée = "Recursive"";
Pou rezoud pwoblèm pou CONTIENT. an reyalite, sa tou rezoud pwoblèm recherche orijinal m' Et si mwen te spécifiée récursive a attribute premye fwa, Mwen ta pa te kwaze ak kesyon an ankò.
Lefèt ke yon SPQuery ki chita nan vi travay pou kèk operatè (GEQ/LEQ) e pa zòt (CONTIENT), makonnen ak Lefèt ke Indicateurs pa parèt pou travay tout avèk Katab contenant dokiman bibliyotèk kondwi m' a kwè ke SPQuery gen kèk bagay orthogonality.
Espesyal ki byen pa pi mal:
- Les gens bon nan U2U Et requête yo konnen si yon moun.
- Grand Michael Hoffer "pa fè etid (n)" blog pòs, kòmantè Et réponses.
</fen>
http://www.batteryfast.co.uk/asus/w3v.htm asus w3v pil pou flach,
http://www.batteryfast.co.uk/asus/w3000a.htm asus w3000a pil pou flach,
http://www.batteryfast.co.uk/asus/w3000.htm asus w3000 pil pou flach,
http://www.batteryfast.co.uk/asus/w3000v.htm asus w3000v pil pou flach,
http://www.batteryfast.co.uk/asus/a31-s5.htm asus a31-s5 pil pou flach,
http://www.batteryfast.co.uk/asus/a32-s5.htm asus a32-s5 pil pou flach,
http://www.batteryfast.co.uk/asus/s52n.htm asus s52n pil pou flach,
http://www.batteryfast.co.uk/asus/s5000.htm asus s5000 pil pou flach,
http://www.batteryfast.co.uk/asus/s5200n.htm asus s5200n pil pou flach,
http://www.batteryfast.co.uk/asus/s5n.htm asus s5n pil pou flach,
http://www.batteryfast.co.uk/asus/90-naa1b1000.htm asus 90-naa1b1000 pil pou flach,
http://www.batteryfast.co.uk/asus/s2691061.htm asus s2691061 pil pou flach,
http://www.batteryfast.co.uk/asus/a42-v6.htm asus a42-v6 pil pou flach,
http://www.batteryfast.co.uk/asus/a32-u5.htm asus a32-u5 pil pou flach,
http://www.batteryfast.co.uk/asus/u5f.htm asus u5f pil pou flach,
http://www.batteryfast.co.uk/asus/u5a.htm asus u5a pil pou flach,
http://www.batteryfast.co.uk/asus/u5f.htm asus u5f pil pou flach,
http://www.batteryfast.co.uk/asus/u5.htm asus u5 pil pou flach,
http://www.batteryfast.co.uk/compaq/nw8000.htm compaq nw8000 pil pou flach,
http://www.batteryfast.co.uk/compaq/nc8000.htm compaq nc8000 pil pou flach,
http://www.batteryfast.co.uk/compaq/v1000.htm compaq v1000 pil pou flach,
http://www.batteryfast.co.uk/compaq/nc6000.htm compaq nc6000 pil pou flach,
http://www.batteryfast.co.uk/compaq/nx5000.htm compaq nx5000 pil pou flach,
http://www.batteryfast.co.uk/compaq/n600.htm compaq n600 pil pou flach,
http://www.batteryfast.co.uk/compaq/n600c.htm compaq n600c pil pou flach,
http://www.batteryfast.co.uk/compaq/n610c.htm compaq n610c pil pou flach,
http://www.batteryfast.co.uk/compaq/n610v.htm compaq n610v pil pou flach,
http://www.batteryfast.co.uk/compaq/n620c.htm compaq n620c pil pou flach,
http://www.batteryfast.co.uk/compaq/e500.htm compaq e500 pil pou flach,
http://www.batteryfast.co.uk/compaq/e500s.htm compaq e500s pil pou flach,
http://www.batteryfast.co.uk/compaq/v300.htm compaq v300 pil pou flach,
http://www.batteryfast.co.uk/compaq/v500.htm compaq v500 pil pou flach,
http://www.batteryfast.co.uk/compaq/pp2060.htm compaq pp2060 pil pou flach,
http://www.batteryfast.co.uk/compaq/nx9000.htm compaq nx9000 pil pou flach,
http://www.batteryfast.co.uk/compaq/nx9005.htm compaq nx9005 pil pou flach,
http://www.batteryfast.co.uk/compaq/nx9010.htm compaq nx9010 pil pou flach,
http://www.batteryfast.co.uk/compaq/nx9020.htm compaq nx9020 pil pou flach,
http://www.batteryfast.co.uk/compaq/n110.htm compaq n110 pil pou flach,
http://www.batteryfast.co.uk/compaq/n110s.htm compaq n110s pil pou flach,
http://www.batteryfast.co.uk/compaq/pp2101x.htm compaq pp2101x pil pou flach,
http://www.batteryfast.co.uk/compaq/presario-2100.htm compaq presario 2100 pil pou flach,
http://www.batteryfast.co.uk/compaq/ze4000.htm compaq ze4000 pil pou flach,
http://www.batteryfast.co.uk/compaq/f4809a.htm compaq f4809a pil pou flach,
http://www.batteryfast.co.uk/compaq/f4812a.htm compaq f4812a pil pou flach,
http://www.batteryfast.co.uk/dell/inspiron-700m.htm Dell inspiron and 700 batri,
http://www.batteryfast.co.uk/dell/inspiron-710m.htm Dell inspiron and 710 batri,
http://www.batteryfast.co.uk/dell/latitude-x200.htm Dell latitude x 200 pil pou flach,
http://www.batteryfast.co.uk/dell/8u443.htm Dell 8u443 pil pou flach,
http://www.batteryfast.co.uk/dell/312-0058.htm Dell 312-0058 pil pou flach,
Ou konnen StringBuilder se pi bon pratique pou kreye fisèl lontan, pa vre?