Ir para conteúdo
Fórum Script Brasil
  • 0

Configuração Do Webcall


marcelosiccone

Pergunta

:) Por favor pessoal estou com dificuldades na configuração da ferramenta de comunicação WebCall.

O problçema esta no caminho do banco de dados:

Eu criei uma nova pasta e salvei com o nome "chat"

Dentro dela eu descompaquitei os arvivos do webcall que são:

Default,chekchat e uma pasta com o nome de chat ( aonde estão os demais arquivos e o Db):

No arquivo chekchat, é configurado o caminho para o banco de dados, ai esta o meu problema, vou postar o codigo abaicho,e em siguida o erro que esta aparecendo no navegador, sera que alguém poderia me dar uma dica como ficaria o caminho do banco de dados? Valeu pessoal..............

<%
'Include this file on every page on your website, EXCEPT the livesupport pages
'Checks to see if the user is wanted in a chat room by the admin and updates active users table
'You will need to change DB path and name

'Set the script timeout in seconds
Server.ScriptTimeout = 90

'Set Dimension Variables
Dim strDataBasePath 'Holds the path to the database
Dim cString 'Holds the entire connection string
Dim adoCon 'Holds the ado connection
Dim SQL 'Holds SQL statement
Dim strIPAddress 'Holds the current users IP address
Dim rs_Active_Users 'Record sheet for the active users table
Dim chatwanted 'Holds 0 if admin doesnt to chat with them, 5 if the admin does
Dim usrID 'Holds user ID

Set adoCon = Server.CreateObject("ADODB.Connection")

'------------------------------------------------------------------------------------
'Change this value to the path of the database
strDataBasePath = "chat/suporte.mdb"
'------------------------------------------------------------------------------------

'Connection string for the database
'If the following line does not work comment it out with a ' at the start of the line and uncomment another string
cString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strDataBasePath)

'Uncomment this connection string if you are using Access Database 2000 or 2002
'cString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(strDataBasePath) 

'Uncomment this connection string if you are using a DSN (note: DSN is slower than the above connection strings)
'cString = "DSN=NAME_OF_DSN"
'Replace the NAME_OF_DSN with the DSN

'Give the variables some values
strIPAddress = Request.ServerVariables("REMOTE_ADDR") 'Set the variable to hold the value of IP address

'Open the connection to the database path specified at top of page
adoCon.Open cString

'Open the active users record sheet
Set rs_Active_Users = Server.CreateObject("ADODB.Recordset")

'Create a new SQL statement to select the data from the row where users IP equals IP in database
strSQL = "SELECT tblActiveUsers.* From tblActiveUsers WHERE IP='" & strIPAddress & "';"

'Set the cursor and lock types
rs_Active_Users.CursorType = 2
rs_Active_Users.LockType = 3

'Open the record sheets and execute the SQL statement
rs_Active_Users.Open strSQL, CString

'Check the database to see if the user whos online has a field in the database, if not create one
If rs_Active_Users.EOF Then

'Insert the users IP address into a new row in database
strSQL = "INSERT INTO tblActiveUsers (IP) VALUES ('" & strIPAddress & "');"

'Write data
adoCon.Execute(strSQL)

'If there is a record for the current user then update, dont create new
Else

'Set new SQL statement, set the last active field to the current time
strSQL = "UPDATE tblActiveUsers SET tblActiveUsers.LastActive=Now() WHERE IP='" & strIPAddress & "';"

'Write data
adoCon.Execute(strSQL) 
End If

'Delete records older than 10 minuites, they are no longer active
strSQL = "DELETE FROM tblActiveUsers WHERE tblActiveUsers.LastActive < Now() - 0.0070;"

'Write data
adoCon.Execute(strSQL)

'Requery the record sheet to get data up to date
rs_Active_Users.Requery

'Close n' clean!
rs_Active_Users.Close
Set rs_Active_Users = Nothing
adoCon.close

'Open the table tblActiveUsers
set rs_Active_Users = server.createobject("ADODB.RecordSet")

'Create new SQL string
StrSql="SELECT * FROM tblActiveUsers WHERE IP='" & strIPAddress & "';"
'Open record sheet execute SQL string
rs_Active_Users.open StrSql,cString,3,3

'Take the values from the database field and put them in the variables
chatwanted = rs_Active_Users("ChatRequest")
usrID = rs_Active_Users("ID")

'Close the record sheet and clean up
rs_Active_Users.Close
Set rs_Active_Users = Nothing
%>

<%
'If the field chatwanted is set to something other than 0 Then open chat automaticaly
IF chatwanted <> 0 THEN
%>
<script language="Javascript">
pop1=window.open("chat/default.asp?que=1","pop1",
"width=400, height=300, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no");
</script>
<%ELSE%>
<%END IF%>

Microsoft JET Database Engine error '80004005'

Could not find file 'E:\vhosts\portaldahepatite.com\httpdocs\chat\chat\suporte.mdb'.

/chat/checkChat.asp, line 41

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

Caro bareta

Consegui resolver o caminho do banco, já estou na area de admin, mais agora tem outro problema cara!

La você tem que copiar o codigo para colocar em sua pagina para aparecer a imagem de on e Off line, o codico é

<!--início WEBcall -->

<script language="JavaScript" src="http://at01.webcallsuporte.com.br/chat/script.asp"></script>

<!--fim WEBcall -->

Mais não está aparecendo imagem alguma.......Sera que o servidor deles esta fora do ar?

Voc~e por favor saberia me diser oque pode estar acontecendo?

Valeu mais uma ves

Grato

Link para o comentário
Compartilhar em outros sites

  • 0

Desculpe reabrir essa discução depois de muitos anos.

Também estou tendo esse problema, será que algum usuario do forum está usando essa ferramenta de outra forma, acho que esse caminho passado na página de admin, já está inativo. e como vou usar esse serviço em uma intranet onde os funcionários não tem acesso a internet não iria funcionar.

Link para o comentário
Compartilhar em outros sites

  • 0

se o problema está em

<!--início WEBcall -->
<script language="JavaScript" src="http://at01.webcallsuporte.com.br/chat/script.asp"></script>
<!--fim WEBcall -->
não seria o caso de apontar para o seu script.asp ????
<!--início WEBcall -->
<script language="JavaScript" src="http://site.com/sistema/script.asp"></script>
<!--fim WEBcall -->

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...