Boa Noite,
Como fazer para informar o caminho do meu bd sendo que o mesmo está em um outro diretório do meu site, meu exemplo está assim:
<% If strSearch <> "" Then strDBPath = Server.MapPath("meubanco.mdb") Const adUseClient = 3 Set cnnSearch = Server.CreateObject("ADODB.Connection") cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";" cnnSearch.CursorLocation = adUseClient strSQL = "SELECT categoria, data,materia,titulo,foto,foto2,foto3,id " _ & "FROM 2015 " _ & "WHERE link LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ & "OR link LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ & "ORDER BY data;" Set rstSearch = cnnSearch.Execute(strSQL) intContador = rstSearch.RecordCount %>
Já tentei deixar o Server.MapPath("./meubanco.mdb") mas retorna o erro:
Microsoft JET Database Engine erro '80004005'
Não foi possível encontrar o arquivo 'C:\Inetpub\vhosts\siqueiracampos.pr.gov.br\httpdocs\DOE\imagens\noticias.mdb'.