It looks like you're new here. Sign in or register to get started.
Server.SETRANGE("My Server",TRUE); Server.FIND('-');
Context := CONTEXTURL; ServerName := COPYSTR(Context,STRPOS(Context,'servername=')+11); // Delete the "prefix" ServerName := DELSTR(ServerName,STRPOS(ServerName,'&')); // Delete trailing p. DatabaseName := COPYSTR(Context,STRPOS(Context,'database=')+9); // -do- DatabaseName := DELSTR(DatabaseName,STRPOS(DatabaseName,'&')); // -do-
Comments
Try
name:=CONTEXTURL;
i:=STRPOS(name,'database=');
IF i > 0 THEN BEGIN
name:=COPYSTR(name,i+9,999);
i:=STRPOS(name,'&');
dbName:=COPYSTR(name,1,i-1); END;
This works fine for us and seems to be a lot quicker. We tried your other method as well and it as un-workable.
Regards
Meint
Peter