cancel
Showing results for 
Search instead for 
Did you mean: 

[BO6.5.1] How extracting Documents from repository with .NET

Former Member
0 Kudos

Hello,

I'm trying to do an extract directly from the repository with C#.NET 2005. I'm encontering a small problem ,I don't have the SQL Statement to do this operation.

I tried this

SELECT obj_m_documents.M_DOC_C_NAME 
FROM obj_m_documents 
WHERE obj_m_documents.M_DOC_N_TYPE=1

With this statement i have only names of my documents.

Is someone has the statement which allows to extract documents from the repository?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello, Antonio;

There is no Visual Studio .NET SDK for BOE 6.5. It is supported using COM only. You may want to post a question on what access is available to one of the following forums.

Elaine

Moved thread to Legacy forum group

Edited by: Don Williams on Oct 15, 2008 6:59 AM

Answers (1)

Answers (1)

ted_ueda
Employee
Employee
0 Kudos

Ultimately, what are you going to do with the documents after you've extracted it?

It's generally recommended to use the SDK (WICOM or WIBean) to retrieve documents if you're using custom code - are you able to use those to get the documents?

Sincerely,

Ted Ueda

Former Member
0 Kudos

Hello,

My request is in progress i have now this code which allows to import documents from repository and save them in a folder. This is the code:

      string repositoryDoc;
                int nbreDoc = lbNomCategories.SelectedIndices.Count;
                int indexlbNomCat;
                //Partie de code pour le référenciel
                boAppli = Instancebo.Instance();
                boAppli.ExchangeDomain = "Document";
                boAppli.ExchangeMode = busobj.BoExchangeMode.boRepositoryMode;
                for (int i = 0; i < nbreDoc; i++)
                {
                    indexlbNomCat = lbNomCategories.SelectedIndex;
                    repositoryDoc = lbNomCategories.Text;
                    boAppli.Documents.Receive(repositoryDoc,repositoryDir);
                    lbNomCategories.SetSelected(indexlbNomCat, false);
                }

But I enconter one problem with kind of documents I have this message: "No document found with this filename". But when i put these documents in an other Category i don't have this message. So I don't understand why.

someone ca help me?

ted_ueda
Employee
Employee
0 Kudos

So if you invoke Receive without any arguments, a dialog box should pop up - do you see the document there? If you do, and you select the document and save path, what happens?

Sincerely,

Ted Ueda

Former Member
0 Kudos

I'm sorry but i can't invoke Receive without any arguments i tried this code

boAppli.Documents.Receive("", "");

but as document name is missing i have message document not found. that is normal. But anyway i don't have a dialog box appears. And this way

boAppli.Documents.Receive();

i have message Invalid Argument number.

Edited by: Afonso-Moreira Antonio on Oct 21, 2008 5:20 PM

ted_ueda
Employee
Employee
0 Kudos

C

  1. COM Interop doesn't explicitly support optional parameter values, so you'd be stuck. Would you try VB or VBA?

I don't know if you pass 'missing' from System.Type.Missing as arguments whether that would work.

Sincerely,

Ted Ueda

Former Member
0 Kudos

No I don't try with VB or VBA yet. But if i try with

object oM = System.Reflection.Missing.Value;

and this code

boAppli.Documents.Receive(oM, oM);

i have message says import ok. That is strange because there is no document name.

Former Member
0 Kudos

Hello I found what was wrong but i don't know why. I explain:

When you imports document from repository; BO stores them in UserDocs, and the default way of it is in TOOLS/options in Desky. If I change this I enconter any problems. But if the directory when i store my document is different from whom is in TOOLS/options i need to make a copy of each document in the UserDocs before refresh.

I don't know why?