VisionWS

A forum for discussing new installs or conversions from other software.
mkalyonski
Posts: 6
Joined: Wed Dec 12, 2012 12:27 pm
Brief Company Description: Mentor Mate
Deltek Vision Version: 6.1
Number of Employees: 150
Company Position: Software Engineer
Number of Offices: 0

VisionWS

Postby mkalyonski » Wed Dec 12, 2012 12:40 pm

Hi

I am using the Deltek VisionWS in a .NET project by referencing the API service.
I am trying to read some employee Data using the GetEmployeesByQuery method of the proxy class generated by the WebService:

Code: Select all

DeltekVisionOpenAPIWebServiceSoapClient service = new DeltekVisionOpenAPIWebServiceSoapClient("DeltekVisionOpenAPIWebServiceSoap");                                             
string result = service.GetEmployeesByQuery(connXML, "select top 10 * EM.FirstName, EM.LastName , EM.Employee, Em.Status, EM.Email from EM", "Primary");


The API seems to return all columns from the "EM" table even I specifically named those I need, also can I return only a subset of the records by using T-SQL words like ( TOP , Order BY ) available for use in the Query parameter.
The "TOP" keyword seems to be ignored.

Thanks, Martin Kalyonski

DouglasT
Posts: 45
Joined: Wed Nov 18, 2009 1:21 pm
Brief Company Description: Write custom Vision Reports
Deltek Vision Version: 6.1
Number of Employees: 600
Company Position: Consultant
Number of Offices: 6
Year Vision Installed: 2005
Location: Washington State
Contact:

Re: VisionWS

Postby DouglasT » Wed Dec 12, 2012 12:59 pm

Do you include your asterisk "*" in the query that is returning more columns than you want?
Douglas Tatelman
douglas@Pickteam.com

mkalyonski
Posts: 6
Joined: Wed Dec 12, 2012 12:27 pm
Brief Company Description: Mentor Mate
Deltek Vision Version: 6.1
Number of Employees: 150
Company Position: Software Engineer
Number of Offices: 0

Re: VisionWS

Postby mkalyonski » Thu Dec 13, 2012 5:26 am

DouglasT wrote:Do you include your asterisk "*" in the query that is returning more columns than you want?

No, this is my query:

Code: Select all

string result = service.GetEmployeesByQuery(connXML, "select top 10  EM.FirstName, EM.LastName , EM.Employee, Em.Status, EM.Email from EM", "Primary");

Still returning all possible columns and all rows from the EM table. ( TOP keyword and explicitly listing of the columns are ignored ).

mkalyonski
Posts: 6
Joined: Wed Dec 12, 2012 12:27 pm
Brief Company Description: Mentor Mate
Deltek Vision Version: 6.1
Number of Employees: 150
Company Position: Software Engineer
Number of Offices: 0

Re: VisionWS

Postby mkalyonski » Mon Dec 17, 2012 11:50 am

mkalyonski wrote:
DouglasT wrote:Do you include your asterisk "*" in the query that is returning more columns than you want?

No, this is my query:

Code: Select all

string result = service.GetEmployeesByQuery(connXML, "select top 10  EM.FirstName, EM.LastName , EM.Employee, Em.Status, EM.Email from EM", "Primary");

Still returning all possible columns and all rows from the EM table. ( TOP keyword and explicitly listing of the columns are ignored ).


Hi,
Do we have progress on my question , because with the case when we have to retrieve for example 20-30 thousand rows - it is not effective at all. Even more we need related tables like "EMProjAssoc" and "PrClientAssoc" and then the size of the response becomes Huge and this it's not working for me. So a filtering solution for the QUERY parameter is important to me to so I can retrieve the data in chunks ( this should be something similar to the SQL - TOP and ORDER BY keywords).
Thanks in advance.

mkalyonski
Posts: 6
Joined: Wed Dec 12, 2012 12:27 pm
Brief Company Description: Mentor Mate
Deltek Vision Version: 6.1
Number of Employees: 150
Company Position: Software Engineer
Number of Offices: 0

Re: VisionWS

Postby mkalyonski » Tue Dec 18, 2012 8:46 am

Hi,

I've figured out how to do it ( TOP,Order By functionality) by using GetRecordsByQuery Method and specifiying the InfoCenter parameter wtih the ChunkSize and Chunk attributes.

mkalyonski
Posts: 6
Joined: Wed Dec 12, 2012 12:27 pm
Brief Company Description: Mentor Mate
Deltek Vision Version: 6.1
Number of Employees: 150
Company Position: Software Engineer
Number of Offices: 0

Re: VisionWS

Postby mkalyonski » Tue Dec 18, 2012 12:46 pm

Hi, I got prolems retreieving data from one of the tables ( about 18000 rows) even when specifying the CHUNK option.

Code: Select all

 string InfoCenter = @"<InfoCenters><InfoCenter ID=""1""  Name=""Projects""  RowAccess=""0"" PartialAccess=""1"" Chunk=""1""  ChunkSize=""500""  >
                <PR>
                    <LongName></LongName>
                    <Address1></Address1>
                    <Address2></Address2>
                    <City></City> 
                    <State></State> 
                    <ZIP></ZIP> 
                    <ModDate></ModDate>
                    <CreateDate></CreateDate>                     
                </PR>
               </InfoCenter>
            </InfoCenters>";

        string sXML = service.GetRecordsByQuery(connXML, InfoCenter, @"<Queries><Query ID=""1"">select PR.LongName, PR.Address1, PR.Address2, PR.City, PR.State, PR.ZIP, PR.ModDate, PR.CreateDate FROM PR</Query></Queries>", "");                     
     


So I am basically trying to retreive the records by a page of 500 , but it's giving me a timeout ( set to 30 minutes , should be enough ). Is there a way to specify which related FK tables of the "PR" table will be returned?
"Primary" is not specified so it returns all related tables , but I only need data from one of these and I doubt that this slows down the things.

mkalyonski
Posts: 6
Joined: Wed Dec 12, 2012 12:27 pm
Brief Company Description: Mentor Mate
Deltek Vision Version: 6.1
Number of Employees: 150
Company Position: Software Engineer
Number of Offices: 0

Re: VisionWS

Postby mkalyonski » Wed Dec 19, 2012 12:45 pm

When i try to retrieve the data in Chunks on the 2nd iteration it's giving me an error :
<DLTKVisionMessage><ReturnCode>ErrGetRecs</ReturnCode><ReturnDesc>An unexpected error occured while retrieving records</ReturnDesc><Detail>The given key was not present in the dictionary.</Detail><CallStack>
GetRecordsByQuery.GetRecordsByQuery.VisionWSUtil.GetRecordsFromCache</CallStack></DLTKVisionMessage>

I am simply incrementing the Chunk attribute of the InfoCenter parameter, but obviously something is wrong. Can you help me with that ?

Here's my code :

Code: Select all

for (int page = 1; page <= pageCount; page++)
            {
                string InfoCenter = @"<InfoCenters><InfoCenter ID=""1""  Name=""Clients""  RowAccess=""0"" PartialAccess=""1"" Chunk="""+ page.ToString() + @"""  ChunkSize=""500""  >
                <CL>
                    <Client></Client>
                        <Name></Name>
                        <Type></Type>
                        <Status></Status>
                    </CL>
                    </InfoCenter>
                </InfoCenters>";
                string queryXML = @"<Queries><Query ID=""1"">select Client,Name,Type,Status FROM CL,CLAddress</Query></Queries>";
                string sXML = service.GetRecordsByQuery(connXML, InfoCenter, queryXML, "");

sbcole4
Posts: 1
Joined: Thu Jan 05, 2017 2:06 pm
Brief Company Description: Working with clients to aid in the transfer of data between their financial application and Concur
Deltek Vision Version: 7.0
Number of Employees: 150
Company Position: Engineer
Number of Offices: 0

Re: VisionWS

Postby sbcole4 » Thu Jan 05, 2017 3:09 pm

Did you ever figure out the chunk error? I'm trying to do the same thing.


Return to “Vision Implementation & Integration”

Who is online

Users browsing this forum: No registered users and 1 guest