Link to home
Start Free TrialLog in
Avatar of priyapurushoth
priyapurushoth

asked on

Using DECS in Lotus Domino server 5.0.12

I have a form where the user will enter his employee id. With this employee id I have to fetch his accessId from  a table called "EmpaccessId" and for that corresponding AccessId I have to fetch his AccessCode which is a Blob data from another table called Empaccesscode and display it in my Form. The external database is SQL SERVER 2000. I have only DECS service available on my server.

Please help me with this..
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of marilyng
marilyng

Hi priyapurushoth,
You can retrieve using DECS or LotusScript, either way you need to configure on your server (if using DECS) DSN for the database, including a username and password.  Then you have to on SQL server configure that username and password to access the tables and fields.  Since you're using Windows 2000, then then windows 2000 permissions come into play for accessing the server.  But offhand, I think you'll have problems collecting the BLOB values, since R5 doesn't have the streaming method

See: http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/fcbb883fdd6eef9e85256ac600659211?OpenDocument

Also see this for some nice examples:
http://www-128.ibm.com/developerworks/lotus/library/lclsx-attachments/

See this for DECS Installation and set up:
http://www.redbooks.ibm.com/redbooks/SG245593.html

So,

1- configure SQL server access for the users (you can let them authenticate using NT server permissions)
2-configure SERVER access for the users
3 - configure SERVER access for the Domino server
4. Set up DSN (ODBC) on DOMINO to link to your SQL server table.

Depending on your database, when a user enters an ID and clicks a button, then it's assumed that the LOOKUP is running on the user permissions,

Regards!
Avatar of priyapurushoth

ASKER

Thanks all I some how made a connection to the SQL server using DECS and I am able to get data. I have one problem I have a field which is BLOB in SQL and it stores jpeg image. Now I get a binary value in my lotus notes form.. Can anyone help me in displaying the image in my Notes Form.

Thanks in Advance!
Hey guys some how  I am able to download the jpeg image to a folder. I have saved the image as "empId.jpeg".Now within my lotus form i have to display that image based on the empId. How can I do this?

Say whenever I open the Notes Doc for a particular empid that image has to be loaded in the form. Please help me with this

Thanks!
If you know the file or folder location and depending on your version of notes, you can simply add computed text to the form and make it pass through html:

server := @If(@Subset(@DbName;1) = ""; "localhost"; @Subset(@DbName;1));
"<img src=\"http://" + server + "/" + @WebDbName + "/" + @Text(@DocumentUniqueID) + "/$File/" + @URLEncode( "Domino" ; @AttachmentNames) + "\"></img><br>"

With the image source either being a document in the database, or a folder/filename... standard html, should work for both client and webside.

However, I haven't tried this with an external image file.. so try first in your folder, then try in the html folder on the domino server.

so, you would replace the @Webdbname part forward with your path/filename.

See if that helps.