Skip to Content
0
Former Member
Nov 12, 2012 at 09:47 AM

Issue with xp_read_file returns NULL

43 Views

Hi Guys,

I am having an issue in xp_read_file.

Please find the below insert statement.

INSERT INTO Emps(firstName, lastName, userId, _location, email, officePhone, cellPhone, department, jobTitle, pic, managerId) VALUES ('Fran', 'Whitney', 'franw', '49 East Washington Street, Needham, MA, USA', 'franw@mycompany.com', '1-617-555-3985', '', 'Research and Development', 'Senior Director', xp_read_file('C:\empDirImages\female1.jpg'), 'kurtd')

While executing the above statement,am getting a sql error as

SQL Anywhere Error -195: Column 'pic' in table 'Emps' cannot be NULL

(0 rows affected)

xp_read_file returns NULL while executing the insert statement.

Please help me to solve this issue................