User Answers

##class(Ens.Rule.FunctionSet).Pad(inputString,LengthofYourString,0)     

 Eg: w ##class(Ens.Rule.FunctionSet).Pad(1,-4,0)    

0001


 

Add the reference to cache provider for .net

using InterSystems.Data.CacheClient;


CacheDataReader dr;

using (CacheConnection con = new CacheConnection())
   {
             con.ConnectionString = "Server=" + Servername+ ";" + "Port=1972; Namespace=Namespace;" + "Password=" + Password + ";" + "User ID=" + UserName + ";";

I've tried using intersystems provider for jdbc and it's work fine. Below is the sample.

 

import com.intersys.jdbc.CacheDataSource;
//C:\InterSystems\HealthShare\dev\java\lib\JDK18\cache-jdbc-2.0.0.jar

public class Assignment {

    public static void main(String[] args) {
        
            ConnectionString = "jdbc:Cache://" + localhost+ ":" + 1972+ "/" + "SYS";
            CacheDataSource ds = new CacheDataSource();
            ds.setURL(ConnectionString);
            ds.setUser(UserId);
           ds.setPassword(Password);

 ClassMethod  Createtask() As %Status
{

Set tStatus = $$$OK
Try 
{