cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with xp_read_file returns NULL

Former Member
0 Kudos

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................

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sabira,

Place the image files at the server (C:\empDirImages\female1.jpg) where you have SQL Ayywhere is installed.

Thanks,

Doak Regis