Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
vulmarjunior

Alguem Pode Resolver?

Question

Estou tentando configurar esse arquivo para usar o bd em access, já indiquei o caminho certinho do bd mas sempre aparece esse erro:

Tipo de erro:

Erro de compilação do Microsoft VBScript (0x800A0400)

Instrução esperada

/pontocom/helpdesk/www/settings.asp, line 27

3 - Access Database (set AccessPath)

Não cosegui decifrar esse enigma.... tai o codigo pra você darem uma olhada

<script LANGUAGE = "VBScript" RUNAT="Server">

' Liberum Help Desk, Copyright © 2000 Doug Luxem

' Liberum Help Desk comes with ABSOLUTELY NO WARRANTY

' Please veiw the license.html file for the full GNU

' General Public License

' --------

' SETTINGS.ASP

'

' Loads the appplication variables.

' --------

' SetAppVariables:

' The procedure runs when the application is started or the file is changed

' Primary ojbectives are to set variables/constants used throughout the

' application.

Sub SetAppVariables

'========================================

' Database Information

' Database Type

' 1 - SQL Server with SQL security (set SQLUser/SQLPass)

' 2 - SQL Server with integrated security

3 - Access Database (set AccessPath)

'4 - DSN (An ODBC DataSource) (set DSN_Name)

Application("DBType") = 3

'========================================

'============ SQL SETTINGS ==============

Application("SQLServer") = "SQLSERVER" ' Server name (don't put the leading \\)

Application("SQLDBase") = "HelpDesk" ' Database name

Application("SQLUser") = "sa" ' Account to log into the SQL server with

Application("SQLPass") = "sapass" ' Password for account

' =======================================

'=========== ACCESS SETTINGS ============

'Physical path to database file

Application("AccessPath") = "E:\Inetpub\dados\helpdesk2000.mdb"

'========================================

'============= DSN SETTINGS =============

Application("DSN_Name") = "HelpDeskDSN"

'========================================

' Enable Debugging:

' Set to true to view full MS errors and other debug information

' printed. (This will disable most On Error Resume Next statements.)

Application("Debug") = False

End Sub

</SCRIPT>

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Brother!!

Esta me parecendo problemas de DSN. :o

Dentro da sua maquina, há algum DSN como titulo de "HelpDeskDSN" conectado a um banco de dados do SQLServer chamado "HelpDesk" ?

Se você deseja trabalhar com Access e abrir seu banco de dados, use o seguinte código:

<%
Dim Conn, strConn, cBanco
cBanco = Server.MapPath("/banco.mdb")
strConn = "Provider = Microsoft.jet.oledb.4.0; Data Source = "& cBanco &";"
Set Conn = Server.CreateObject("adodb.connection")
Conn.Open(strConn)
%>

Abraços!!!

Share this post


Link to post
Share on other sites
  • 0

quando voce colocou os Database types voce não citou o "3 - Access Database" como comentario, então ele esta rodando como se fosse parte do codigo...

bom isto e o que eu penso...

Boa Sorte

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



  • Forum Statistics

    • Total Topics
      148495
    • Total Posts
      644146
×
×
  • Create New...