Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

macintoshiano.net

pq da esse erro???

Recommended Posts

hello pessoal, estou com um problemão...

eu peguei na net um sistema de banners e na hora q publiquei no servidor deu esse erro:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

 

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x498 Thread 0x644 DBC 0xd587024 Jet'.

 

/banners/default.asp, line 48

http://www.adoracaoelouvor.com.br/default2.asp

o código da pg:

 

<%

' IRAN ASP POROGRAMER © 2002 - 2003 Tehran, Inc.  http://www25.brinkster.com/mohammadz

' copy right in iran - tehran © 2002 - 2003

' Unauthorized redistribution is a violation of federal law.

 

SET Conn = Server.CreateObject("ADODB.Connection")

SET RS = Server.CreateObject("ADODB.RecordSet")

 

sConnDatabase = "driver={Microsoft Access Driver (*.mdb)};DBQ=d:\corp\system\fcotlkwpnp4kt37jarc1\dados\database.mdb;"

 

'---- CursorTypeEnum Values ----

CONST adOpenForwardOnly = 0

CONST adOpenKeyset = 1

CONST adOpenDynamic = 2

CONST adOpenStatic = 3

 

'---- CursorLocationEnum Values ----

CONST adUseServer = 2

CONST adUseClient = 3

 

'---- CursorOptionEnum Values ----

CONST adHoldRecords = &H00000100

CONST adMovePrevious = &H00000200

CONST adAddNew = &H01000400

CONST adDelete = &H01000800

CONST adUpdate = &H01008000

CONST adBookmark = &H00002000

CONST adApproxPosition = &H00004000

CONST adUpdateBatch = &H00010000

CONST adResync = &H00020000

 

'---- LockTypeEnum Values ----

CONST adLockReadOnly = 1

CONST adLockPessimistic = 2

CONST adLockOptimistic = 3

CONST adLockBatchOptimistic = 4

 

'---- CommandTypeEnum Values ----

CONST adCmdUnknown = &H0008

CONST adCmdText = &H0001

CONST adCmdTable = &H0002

CONST adCmdStoredProc = &H0004

CONST adCmdFile = &H0100

CONST adCmdTableDirect = &H0200

 

SUB OpenDB(sConn)

Conn.Open sConn // a linha de erro

SET RS.ActiveConnection = Conn

RS.CursorType = AdOpenStatic

END SUB

 

SUB CloseDB(sConn)

RS.Close

Conn.Close

END SUB

%>

<%

OpenDB sConnDatabase

SQL = "SELECT * FROM BannerAds WHERE TotalExposures < MaxExposures AND TotalClicks < MaxClicks"

RS.Open SQL, Conn, 3, 3

IF RS.EOF THEN

ShowBanner = 1

SiteURL = "http://www.sepcity.com"

BannerURL = "http://www.sepcity.com/images/banner.gif"

ELSE

rndMax = CInt(RS.RecordCount)

RS.MoveFirst

RS.MoveFirst

Randomize Timer

rndNumber = Int(RND * rndMax)

RS.Move rndNumber

ShowBanner = RS("ID")

SiteURL = RS("SiteURL")

BannerURL = RS("BannerURL")

BannerUseHTML = RS("UseHTML")

TotalExposures = RS("TotalExposures")

TotalExposures = TotalExposures + 1

SQL = "UPDATE BannerAds SET TotalExposures=" & TotalExposures & " WHERE ID=" & ShowBanner

Conn.Execute(SQL)

END IF

Conn.Close

OpenDB sConnDatabase

SQL = "SELECT * FROM BannerAds WHERE ID=" & ShowBanner

SET RS = Conn.Execute(SQL)

IF BannerUseHTML = True THEN

'Response.Write ("<A HREF='adredir.asp?Id=" & ShowBanner & "&Url=" & Server.URLEncode(SiteURL) & "'>" & RS("HTMLCode") & "</A>")

ELSE

'Response.Write ("<A HREF='adredir.asp?Id=" & ShowBanner & "&Url=" & Server.URLEncode(SiteURL) & "'><IMG SRC='" & BannerURL & "' WIDTH='468' HEIGHT='60' BORDER='0'></A>")

Response.Write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='468' height='60'>")

Response.Write("<param name='movie' value='./banners/images/"& BannerURL &".swf'>")

Response.Write("<param name=quality value=high>")

Response.Write("<embed src='./banners/images/"& BannerURL &".swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='468' height='60'></embed>")

Response.Write("</object>")

   

 

END IF

Conn.Close

%>

desde ja agradeço....

Compartilhar este post


Link para o post
Compartilhar em outros sites

procure conectar no banco de dados via OLE DB(procura no google) ... e isso ocorre se eu não me engano, pois a conexao entende q o banco de dados já está aberto(modo exclusivo)falows

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.