Remote Network Server Connection to an Index Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Just4Ever
    New Member
    • Nov 2006
    • 3

    Remote Network Server Connection to an Index Server

    Hi,
    I was reading a previous post about connecting to an Index Server from another computer. However, I'm having a problem connecting to my remote server due to it's name. It is called h01ny-nt2 and the problem is caused by the "-" symbol. It causes a syntax error and expected end-of-file. I can't use the IP address either because the dots in it conflict with the rest of the statement. Here is my code:

    $link = oledb_open("Pro vider=MSIDXS; Data Source=OfficePr ocedures");
    $server = 'h01ny-nt2';
    $keyword = 'FORMSOF (INFLECTIONAL, '.$_REQUEST['Title'].')';
    $sql = "SELECT filename, size, path
    FROM $server.OfficeP rocedures..SCOP E()
    WHERE CONTAINS(Conten ts, '$keyword')";
    $res = oledb_query($sq l, $link);
    while($row = oledb_fetch_ass oc($res))
    {
    var_dump($row);
    }

    Any help would be greatly appreciated. Thank you for your time and attention.
  • cassbiz
    New Member
    • Oct 2006
    • 202

    #2
    In your code
    Code:
    FROM $server.OfficeProcedures..SCOPE()
    Should it read

    Code:
    FROM $server.OfficeProcedures.SCOPE()
    with a single dot or are you trying to call a Scope Resolution Operator the you would have

    Code:
    FROM $server.OfficeProcedures::SCOPE()
    Hope this helps

    Comment

    • Just4Ever
      New Member
      • Nov 2006
      • 3

      #3
      Thanks for the suggestion but I still receive the error about the "-" symbol for my server name.

      Does anyone know why it doesn't like a "-" symbol when trying to connect to a remote server?

      And is there any way around this such as escaping it or something?

      Thanks

      Comment

      Working...