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

Referenser i asp?


AceOne

Rekommendera Poster

 

Var kan jag hitta de valigaste felen när det gäller asp tex. Har för mig att jag har sett en sida som har det listat men kommer inte ihåg vilken det är?

 

Någon som vet vad jag är ute efter?

 

Försöker nämligen lista ut följande fel jag fick.

 

ADODB.Connection.1 error '80004005'

 

SQLState: S1000

Native Error Code: -3702

[iNTERSOLV][ODBC SequeLink driver][ACCESS][Microsoft][ODBC Microsoft Access Driver] Field 'db.kursnamn' cannot be a zero-length string.

 

 

Länk till kommentar
Dela på andra webbplatser

 

Så här ser koden ut i sidan som ska lista uppgifter ut db till användaren.

<%'get the records!

 

strsql="select * from [db]"

 

rs.open strSql, mydsn

 

'check for records!

 

if rs.eof and rs.bof then %>

 

 

Det är även en include fil till denna sida.

som ser ut så här.

 

<%

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

 

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

 

rs.CursorLocation = 3

 

rs.CursorType = 3

 

'show date

Session.LCID = 1053

datum = Now()

 

'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.Open "DSN=db-db;Passwordklosenord"

 

conn.execute(strSql)

 

conn.close

 

set conn=nothing

 

response.redirect(gowhere)

 

end function %>

 

 

 

 

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...