icstechsales / dql-explorer

Other
9 stars 14 forks source link

Type error 's is undefinded' if databases are located deeper in File-directory #29

Open Harald66 opened 5 years ago

Harald66 commented 5 years ago

If the folder or the database is locate deeper in the file directory than you get a s is undefined error. It is because the json-File has a wrong escape character like :"...folder1/folder2\database.nsf The agent 'getDatabasesFromServer' only replace the first backslash with the function "replaceSubstring". I put a new function in it:

Public Function ReplaceSubstring3(SourceS As String) As String
    Dim SearchS As String, ReplaceS As String   
    SearchS="\"
    ReplaceS="/"    
    While InStr(SourceS, SearchS) > 0       
        SourceS = Left$(SourceS, InStr(SourceS, SearchS) -1) + ReplaceS + _
        Right$(SourceS, Len(SourceS) -InStr(SourceS, SearchS) - Len(SearchS) + 1)       
    Wend
    ReplaceSubstring3 = SourceS 
End Function

If you use this function in line 66 the json-file is ok und will work.

gacres commented 5 years ago

I am out of the office until 2019/08/06.

I am away from the office on business and then vacation. I will be back in the office on Tuesday, July 6.

Note: This is an automated response to your message "[icstechsales/dql-explorer] Type error 's is undefinded' if databses are located deeper in File-directory (#29)" sent on 07/22/2019 4:21:59 AM.

This is the only notification you will receive while this person is away.

Karthikeya14 commented 3 years ago

Simple one liner is enough.. Replace(SourceS, "\", "/")