Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Froms - Spaces in a Strings

Status
Not open for further replies.

kriss

Programmer
Oct 24, 2001
36
KE
I have tried assigning a string with spaces to a variable and to attach it to a mail session ie .....
declare destinatarios varchar2 0):='coguna@kengen.co.ke';
var1 varchar2(100):='testsubject';
var2 varchar2(100):='test';
BEGIN

WIN_API_SHELL.WINEXEC('C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE '|| '-c IPM.Note /m '||destinatarios||'?cc='||'trying'||'&subject='||var1||'&body='||var2, WIN_API.SW_SHOWNORMAL,TRUE);
Exception When others then message(sqlerrm); raise;
END;

This works !!!
However if I assign var1 with a space in between ......
var1 varchar2(100):='test subject';

...it compiles but does not show any text on the mail body at run time. Simply put , the space/s are not recognised and hence the whole text becomes blank!!!
Any help??

Kriss



 
Try delimiting the text in double quotes. eg:

var1 varchar2(100):='"test subject"';

(For readability, that line reads

quote double-quote test subject double-quote quote
 
Thanks Lewisp ...for your reply but apparently,
it is still outputting blanks.

Kriss
 
Try this then:

WIN_API_SHELL.WINEXEC('"C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" '|| '-c IPM.Note /m "'||destinatarios||'?cc='||'trying'||'&subject='||var1||'&body='||var2 || '"', WIN_API.SW_SHOWNORMAL,TRUE);

Note the positions of the double-quotes around the call to outlook.exe and around the set of parameters beginning with .destinatarios'.
 
Guess what Lewisp ......?????

IT WORKED !!!!!

Thanks so much for your help.

Kriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top