mibuso.com

Microsoft Business Solutions online community
It is currently Sat Oct 25, 2014 6:47 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How To retrieve servername and servertype?
PostPosted: Tue Jul 05, 2005 2:36 pm 
Offline
Site Admin

Joined: Sun Nov 07, 1999 8:01 am
Posts: 2070
Location: Wilrijk, Belgium
Country: Belgium (be)
How To retrieve servername and servertype?

http://www.mibuso.com/howtoinfo.asp?FileID=2

Discuss this How To here.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 05, 2005 3:05 pm 
not clear enough, please try to simplify it so i can understand


Top
  
 
 Post subject: Modification
PostPosted: Tue Jul 05, 2005 3:08 pm 
In a introduction stage I was need to understand, what base I Use. To clean understand this, I use another form of this function, and plase it's result to main form (330).
On modification of your variant:

Code: Select all
GetServerName() : Text[30]
ltxtTemp := CONTEXTURL;
i := STRPOS(ltxtTemp,'servername=');
IF i > 0 THEN BEGIN
  ltxtTemp := COPYSTR(ltxtTemp,i + 11,999);
  i := STRPOS(ltxtTemp,'&');
  EXIT(COPYSTR(ltxtTemp,1,i - 1));
END
ELSE BEGIN
  i := STRPOS(ltxtTemp,'database=');
  IF i > 0 THEN BEGIN
   ltxtTemp := COPYSTR(ltxtTemp,i + 9,999);
   i := STRPOS(ltxtTemp,'&');
   EXIT(COPYSTR(ltxtTemp,1,i - 1));
   END ELSE EXIT('');
  END;


Top
  
 
 Post subject:
PostPosted: Thu Jun 08, 2006 10:48 am 
Offline

Joined: Fri Feb 20, 2004 8:28 am
Posts: 9
Location: KOLKATA
Country: India (in)
How to get server date from client machine


Top
 Profile  
 
 Post subject: Re: How To retrieve servername and servertype?
PostPosted: Mon Feb 23, 2009 11:28 pm 
Offline

Joined: Tue May 06, 2008 2:56 pm
Posts: 371
Location: Walton-On-Thames
Country: United Kingdom (uk)
Thankyou, I'd forgotten about this trick.

BTW: if slaha is still around ...

Code: Select all
CREATE VIEW [dbo].[Server Time]
AS
SELECT     '' AS [Key], CURRENT_TIMESTAMP AS ServerTime


Code: Select all
OBJECT Table 50000 Server Time
{
  OBJECT-PROPERTIES
  {
    Date=23/02/09;
    Time=21:14:28;
    Modified=Yes;
    Version List=;
  }
  PROPERTIES
  {
    DataPerCompany=No;
    LinkedObject=Yes;
  }
  FIELDS
  {
    { 1   ;   ;Key                 ;Code10         }
    { 2   ;   ;ServerTime          ;DateTime       }
  }
  KEYS
  {
    {    ;Key                                      }
  }
  CODE
  {
    BEGIN
    END.
  }
}


Just do a GET on the table.

_________________
Robert de Bath
TVision Technology Ltd


Top
 Profile  
 
 Post subject: Re: How To retrieve servername and servertype?
PostPosted: Sun Mar 01, 2009 10:17 am 
Online
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7701
Location: Milan
Country: Italy (it)
You should make a tips/tricks topic for this one!

rdebath wrote:
Thankyou, I'd forgotten about this trick.

BTW: if slaha is still around ...

Code: Select all
CREATE VIEW [dbo].[Server Time]
AS
SELECT     '' AS [Key], CURRENT_TIMESTAMP AS ServerTime


Code: Select all
OBJECT Table 50000 Server Time
{
  OBJECT-PROPERTIES
  {
    Date=23/02/09;
    Time=21:14:28;
    Modified=Yes;
    Version List=;
  }
  PROPERTIES
  {
    DataPerCompany=No;
    LinkedObject=Yes;
  }
  FIELDS
  {
    { 1   ;   ;Key                 ;Code10         }
    { 2   ;   ;ServerTime          ;DateTime       }
  }
  KEYS
  {
    {    ;Key                                      }
  }
  CODE
  {
    BEGIN
    END.
  }
}


Just do a GET on the table.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2014 - 20 & 21 November 2014 ««« Visit the conference website: http://www.navtechdays.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: