Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 1999
    Messaggi
    38

    Connessione database..help me

    Salve è da due giorni che ci provo ma non riesco a farlo funzionere.
    Ho un database su un server locale con i permessi
    Le pagine asp sono posizionate in server remote (intranet)
    Se apro le pag. asp in locale con il seguente codice:
    <%
    set Conn = Server.CreateObject("ADODB.Connection")
    call Conn.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(".") & "\not_operative.mdb")
    if Conn.State = 1 then
    set Cmd = Server.CreateObject("ADODB.Command")
    set Cmd.ActiveConnection = Conn
    Cmd.CommandType = &H0004 'adCmdStoredProc
    Cmd.CommandText = "RicercaIndirizzi"

    ...funziona benissimo...

    Se invece cerco di aprire le pagine asp da server remoto puntanto sul file mdb su server locale con il seguente codice:
    <%
    set Conn = Server.CreateObject("ADODB.Connection")
    call Conn.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(".") & "http:\\10.000.00.000\ser\not_operative.mdb")
    if Conn.State = 1 then
    set Cmd = Server.CreateObject("ADODB.Command")
    set Cmd.ActiveConnection = Conn
    Cmd.CommandType = &H0004 'adCmdStoredProc
    Cmd.CommandText = "RicercaIndirizzi"
    mi da il seguente errore
    Microsoft JET Database Engine error '80004005'
    Not a valid file name.
    ......
    L'accesso al server locale e abilitato con user e psw.
    Se è questo il problema è possibile inserire un codice per saltare la psw? Qual' é'

  2. #2
    Utente di HTML.it L'avatar di willybit
    Registrato dal
    May 2001
    Messaggi
    4,367
    Ciao Elisa,

    non puoi usare un percorso su http per l'mdb
    devi usare un indirizzo fisico
    mappati la cartella del db nel server dove girano le pagine asp

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.