Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002

    Unanswered: Database Location

    Is there anyway in code that you can get a database to return its current location and specifically the number of the machine it is on in a networked system.


  2. #2
    Join Date
    Nov 2001
    1. to get current location try:


    2. Function fOSMachineName() returns computer name, if that what you need. I am not shure though. If I am wrong, correct me.

    Private Declare Function apiGetComputerName Lib "kernel32" Alias _
    "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

    Function fOSMachineName() As String
    'Returns the computername
    Dim lngLen As Long
    Dim lngX As Long
    Dim strCompName As String

    lngLen = 16

    strCompName = String$(lngLen, 0)
    lngX = apiGetComputerName(strCompName, lngLen)

    If lngX <> 0 Then
    fOSMachineName = Left$(strCompName, lngLen)
    fOSMachineName = ""
    End If

    End Function


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts