DB Query error on UpdateProfileAPI.cfm

Have a question about Bullhorn's HTTP based APIs? You've found the right place.

API Update [posted on December 13, 2012]:

This version of the Bullhorn APIs should no longer be used.

All new work should be done using Bullhorn's REST or Web Services APIs. For more information please visit: http://developer.bullhorn.com/documentation

Bullhorn REST API provides a simpler and faster way for developers to build applications that interact with the Bullhorn platform and is used by Bullhorn Inc. to develop features of the Bullhorn ATS/CRM application.

Of the BullhornSTAFFING HTTP API interfaces listed below, our analysis shows that the following are most commonly used by developers:

Resume Parsing API
Published Job Data (XML)
The interface to these will continue to work as is because Bullhorn will replace the back end to use REST API. The URLs for these 2 specific APIs may change in the 2nd half of 2013; developers may require to update their applications to use the new URLs.

Moderators: StaffingSupport, s.emmons

Locked
nicu.danila
User
Posts: 14
Joined: Tue Oct 05, 2010 12:57 pm

DB Query error on UpdateProfileAPI.cfm

Post by nicu.danila » Thu Sep 01, 2011 8:15 pm

Hello, me again :)

I stumbled upon another issue: I try to update the profile of a candidate by submitting an xml to UpdateProfileAPI.cfm. Most of the fields are actually received through a call to ParseResume.cfm. Other than those I set the <SOURCE> field, the <USERID> and occasionally the email, first name and last name (only if not already present).

So here's an xml for which I receive an error:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <BHCandidate>
        <FIRSTNAME>Firstname</FIRSTNAME><PHONE>1 555-555-2514</PHONE><ZIP>07352</ZIP><COUNTRYID>1</COUNTRYID><OCCUPATION>Expense Receipts Analyst</OCCUPATION><NUMCONFIDENCEFIELDS>11</NUMCONFIDENCEFIELDS><COMPANYNAME>Deloitte Support Services India Pvt</COMPANYNAME><BHPARSECONFIDENCEFACTOR>10</BHPARSECONFIDENCEFACTOR><MOBILE>1 201-878-8707</MOBILE><LASTNAME>Lastname</LASTNAME><ADDRESS1>580 Luis Munoz Marin Boulevard, Apartment 11M</ADDRESS1><ADDRESS>580 Luis Munoz Marin Boulevard, Apartment 11M</ADDRESS><BHPARSECONFIDENCEPERCENTAGE>0.909090909091</BHPARSECONFIDENCEPERCENTAGE><SKILLS>growth, ORGANIZATION, Commitment, environment, BILLING, Currency Transaction Report, FEDERAL PRACTICE, governmental billing, Support, Expense, BATCH, QUIZ, BEST PRACTICE, Account, Perform, high level QC, Cost, Financial Modeling, ANALYSIS, Lease, COMMERCIAL, LENDING, LOANS, Property, Commercial Mortgage, Appraisal, TRACK, METRICS, Distribution, QA, domain, TENANT, operating statement, VAX/VMS, Debt-Service Coverage Ratio, Operating Statement Analysis, Gross Income, TOTAL, OPERATING EXPENSES, AUDITS, VENDORS, LOG, PVT, CORPORATE TAXES, tax, general tax, 5500, SALES AND USE TAX, VEHICLE, PERSONAL PROPERTY, Revenue Agent's Report, QUALITY CONTROL, state tax, WINDOWS/NT, FX, Statutory Accounting Principles, PROFESSIONAL REVIEW ORGANIZATION, HEWLETT PACKARD, MS/OFFICE, General Obligation Bond, Tax Compliance, Tax Return, FIRM, SYSTEMS SOFTWARE, income tax returns, Income, Income tax, SOFTWARE TESTING, FICO, PG, SYMBIOSIS, Ordinary and Necessary Expenses, SYSTEM STATUS CONTROLLER, ACCOUNTING, tally, Focus, bank accounts, ASSESSMENTS, efficiency, Schedule, PERFORMANCE, AS, PRESSURE, CAN, BEHAVIOR, TIME MANAGEMENT SKILLS</SKILLS><SKILLID>5047,5127,5228,30278,39233,5047,30278,39233,4919,6804,10595,30278,5047,16701,5228,5047,30278</SKILLID><CITY>Jersey City</CITY><AREACODE>201</AREACODE><WORKAUTHORIZED>1</WORKAUTHORIZED><FULLNAME>Firstname Lastname</FULLNAME><EMAIL>someone@localhost.com</EMAIL><SOURCE>News Article</SOURCE><USERID>64251</USERID>
    </BHCandidate>
</root>
And here's the error returned:

Code: Select all

ERROR: Caught an exception, type = Database

Error Executing Database Query.

[Macromedia][SQLServer JDBC Driver][SQLServer]String or binary data would be truncated.

The contents of the tag stack are:

1 CFQUERY (584,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
2 CF_UPDATEPROFILEAPI (566,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
3 CF_UPDATEPROFILEAPI (158,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
4 CF_UPDATEPROFILEAPI (122,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
5 CF_UPDATEPROFILEAPI (102,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
6 CF_UPDATEPROFILEAPI (99,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
7 CF_UPDATEPROFILEAPI (97,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
8 CF_UPDATEPROFILEAPI (92,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
9 CF_UPDATEPROFILEAPI (78,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
10 CF_UPDATEPROFILEAPI (2,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
11 CF_UPDATEPROFILEAPI (1,0) C:\jrun4\servers\Bullhorn_1\cfusion-ear\cfusion-war\BullhornSTAFFING\API\UpdateProfileAPI.cfm
Error Code: 8152
SQL State: 22001
Can you please advise on how to avoid this error?

Thanks in advance,
Nicu

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: DB Query error on UpdateProfileAPI.cfm

Post by apsmith » Fri Sep 02, 2011 8:57 am

Nicu,

This error means that you are submitting too much data into a given field, please check your post against the field limits.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

nicu.danila
User
Posts: 14
Joined: Tue Oct 05, 2010 12:57 pm

Re: DB Query error on UpdateProfileAPI.cfm

Post by nicu.danila » Fri Sep 02, 2011 4:14 pm

Hi apsmith,

Thanks for your answer, but... "too much data into a given field" is basically a rephrase of "[SQLServer]String or binary data would be truncated.".
My question is which field and what can I do?
Judging by the fields length in the xml above, I assume that the field that's causing troubles is the <SKILLS> field, having 1136 characters and 85 coma separated values.
Please note that this field is returned by ParseResume.cfm; I'd assume that a value that is returned by an API will be accepted back by the same API, but it seems that it's not the case.
So: can you please confirm if that is the field that is generating this error? And can you please tell me how can I determine what is the limit of a certain field? Is that a number of characters limit or a number of values limit?

Thanks,
Nicu

k.pham
User
Posts: 21
Joined: Thu Jun 24, 2010 5:13 pm

Re: DB Query error on UpdateProfileAPI.cfm

Post by k.pham » Wed Nov 16, 2011 10:29 am

The only proble with that request was that the Address and Address1 field was too long. The limit for these fields are 40.
If you limit these fields to less than 40 characters, the request will go through.

documentations on field attributes for the candidate entity can be found on the Resource Center.
If you can't access these files due to log in restriction, please have your clients log in to the resource center and retrieve them for you.

Thanks,

Job Field Attributes
http://bullhorn.custhelp.com/app/answer ... /a_id/1818

Company Field Attributes
http://bullhorn.custhelp.com/app/answer ... /a_id/1815

Candidate Field Attributes
http://bullhorn.custhelp.com/app/answer ... /a_id/1813

Contact Field Attributes
http://bullhorn.custhelp.com/app/answer ... /a_id/1816

Placement Field Attributes
http://bullhorn.custhelp.com/app/answer ... /a_id/1819

Locked