Just nu i M3-nätverket
Gå till innehåll

DSN connection funkar inte?


AceOne

Rekommendera Poster

 

Jag får detta felmeddelande när jag ska skicka info via ett formulär. Vad gör jag för fel i den här kopplingen, någon som kan se det?

 

Vad har jag missat? Man blir hemma blind när man håller på för länge.

------------------------------------

ADODB.Connection.1 error '800a0bb9'

 

The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.

 

utils.inc, line 43

-----------------------------------

 

 

-----------------utils.inc---------

<%'sets up dsnless connection string

 

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

Conn.Open "DSN=konto-dbinfo;Password=lösen"

 

'mydsn="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("..\") & "\dbinfo\info.mdb"

 

'creates ado database objects

 

set rs=server.createobject("adodb.recordset")

 

set conn=server.createobject("adodb.connection")

 

rs.CursorLocation = 3

 

rs.CursorType = 3

 

'if the delete button has been pressed the delrecord function is called

 

'this can be found at the bottom of the admin page

 

if request.querystring("d")<>"" then delrecord()

 

'if add or update has been pressed then this calls dorecord function at bottom of admin page

 

if request.form("submit")<>"" then dorecord()

 

function getLineBreaks(str)

 

'take care of null values

 

on error resume next

 

'this displays carriage returns!

 

getLineBreaks=replace(str,chr(10),"<br>")

 

end function

 

'this function executes the sql statement passed to it from either dorecord or delrecord

 

'and then redirect's to the list screen for that table by using the passed gowhere paramater

 

function xRecord(strSql,gowhere)

 

conn.open mydsn

 

conn.execute(strsql)

 

conn.close

 

set conn=nothing

 

response.redirect(gowhere)

 

end function %>

----------------- end utils.inc ----

 

Länk till kommentar
Dela på andra webbplatser

Nu vet jag inte var rad 43 är men du har en funktion som öppnar datorn med mydsn och du har kommenterat mydsn.

 

/Johan

 

Länk till kommentar
Dela på andra webbplatser

Arkiverat

Det här ämnet är nu arkiverat och är stängt för ytterligare svar.

×
×
  • Skapa nytt...