go to post Gaolai Peng · Sep 20, 2017 This is my sample codeClass CUSTOM.Util.Script.Temp.MyTest Extends %Persistent{Property CreatedOn As %TimeStamp [ InitialExpression = {$ZDT($H,3,1)} ];Property RPPI As %String;Property Name As %String;Property BirthDate As %Date;Property ProgramName As %String;Property CaseTouchedWhen As %DateTime;Property ActiveStatus As %Boolean;Property Status As %String [ InitialExpression = "Pending" ];Index idxRPPI On RPPI;ClassMethod LoadFromFile(){ Set pFileName="C:\mytest.tsv" Set pDelimiter= $C(9) Set rowType="RPPI varchar(50),Name varchar(516),BirthDate Date,ProgramName varchar(50),CaseTouchedWhen DateTime,ActiveStatus Boolean," Do ##class(%SQL.Util.Procedures).CSVTOCLASS(2, .rowType, pFileName, pDelimiter,,1,,,,)}}And I run following command:do ##class(CUSTOM.Util.Script.Temp.MyTest).LoadFromFile()but I got following errorError <PARAMETER>Do you where is wrong in my code?Thanks,
go to post Gaolai Peng · Sep 20, 2017 Thanks Lebedyuk, that's very helpful. What if I have extra properties such as InsertTime in the Test.cvs class?
go to post Gaolai Peng · Sep 19, 2017 Can you provide me some sample code in ObjectScripts? Following sample code is from the document, I don't really understand what is the purpose of the last three lines?set rowtype = "StateFips VARCHAR(2),Zip_Code VARCHAR(5),State_Abbr VARCHAR(2),Name VARCHAR(200),Longitude_West Numeric(10,6),Latitude_North Numeric(10,6)"set filename = "/Users/test/Documents/zip.csv"set result = ##class(%SQL.Statement).%ExecDirect(,"call %SQL_Util.CSV(,?,?)",.rowtype,.filename)set resultSet = result.%NextResult()write resultSet.%Next()write resultSet.StateFipsThanks,
go to post Gaolai Peng · Feb 13, 2017 Thanks for responding so quickly. I tried logged in with my user id, SuperUser, and _System, none of them works. All of those users has roll of %All. Doesn't it include %HS_Administrator role?Thanks,Gaolai
go to post Gaolai Peng · Jan 23, 2017 Hi Mike,I tried this, but I got an error:MyRoutine.INT(2) ERROR #1002: Invalid character in tag : '"Hello there!"' : Offset:1 ["Hello^MyRoutine]Here is what I wrote in my routine:MyRoutine"Hello there!"quitCan you tell me what is wrong? In addition, is routine in cache similar to Main() in C/C++/C#? And the language used is the same as writing a class, such as ObjectScript?Thanks,
go to post Gaolai Peng · Jan 19, 2017 Thanks for your help. I am able to create a new namespace. I do have a local instance installed. I wonder if I could create another instance with different port number locally?
go to post Gaolai Peng · Jan 19, 2017 Thanks for your reply. I checked the document, it says "To create Caché namespaces, you use the Management Portal." There is no more details. Also, I was able to add a new server in the Studio by clicking Add in the Server Connection. I wonder what should I put for the IP_Address , Web Server IP Address and CSP Server Instance? I only want to create a server locally.