LSXODBC and iSeries IFS path name problem

I’m having a problem getting my agent to find a file residing on the iSeries integrated file system when using LSXODBC.

I’m reading records from the iSeries that contain an email address and a file path/name. I want to attach the file to a document and email it to the corresponding address. Everything is working fine except I’m always getting a “can’t find file” error on my EmbedObject method. Here’s an example:

Set inventoryObject = inventoryItem.EmbedObject(EMBED_ATTACHMENT, " ", “\emailReports\SAL408000023.pdf”)

The path\file would actually be in a string field, but I can’t make it work either way.

I’ve used the same syntax for attachments successfully in the past, but the agents did not involve the LSXODBC.

The server is on the same iSeries as the IFS directories.

I’m sure its just a matter of what the path/file syntax should be, but I can’t seem to figure it out.

thanks

bvd

Subject: LSXODBC and iSeries IFS path name problem

Have you ever tried to use “/” instead of "" ???

The "" way of separating parts of a pathname is a Windows speciality…

Regards.

Subject: RE: LSXODBC and iSeries IFS path name problem

Yes, I tried it both ways (theoretically the iSeries will accept either). If I take out all references to the ODBC and just create a memo and attach the file to it, it works fine. When I add the ODBC code the path no longer works.

thanks

bvd

Subject: LSXODBC and iSeries IFS path name problem

Does user profile QNOTES have read authority to the /emailReports directory and the files underneath this directory?

Subject: RE: LSXODBC and iSeries IFS path name problem

Thanks for the reply. Yes QNOTES has total rights to the file.

I did get it to work, but I’m not sure what I did. I commented out all the code concerned with the ODBC and just had it create a memo, add the attachment, and email it. Then I started to uncommenting the other code one line at a time in hopes of finding the problem, but I was able to add all the code back in and it worked? A typo isn’t likely because I justed commented and uncommented each line. The only thing I can think of is that the ODBC connection didn’t get closed properly on my very first failing test?

Anyway, thanks

Bill Van Dusen