Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: Unspecified Error...

    I have an admin system which allows users to add news items etc. But for some reason when the code comes to execute an SQL statement which will add a news item, it just errors without specifying why.

    The bizarre thing is when I've retireved data from the database, such as when the user logs in, it works fine. Obviously something to do with adding records.

    Any ideas? Here is an example of such code...I removed unrelated code...note: the sql statements used are correct...so it's the actual execution.

    strConn = DefineConnectionString("")
    Set adoCn = Server.CreateObject("ADODB.Connection")
    adoCn.Open strConn

    If Request.QueryString("action") = "save" Then

    strSQL = "INSERT INTO tblDocument" ...and so forth

    adoCn.Execute strSQL

    Response.Redirect "admin_MgrDocs.asp"

    End if

    adoCn.Close
    Set adoCn = Nothing


    And yet this code works fines...

    strCn = DefineConnectionString("")
    Set adoCn = Server.CreateObject("ADODB.Connection")
    adoCn.Open strCn

    SQL = "SELECT Passcode, FullName"...and so forth

    Set objRS = adoCn.Execute(SQL)

    ' DO STUFF

    ' Garbage collection
    Set objRS = Nothing
    Set adoCn = Nothing

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    What is actually returned when it errors out ?

  3. #3
    Join Date
    Nov 2003
    Posts
    2
    Nothing specific, just Internal Error 500 or whatever.

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    What about below the internal server error - there should be more specific information - also, did you check the event logs ?

  5. #5
    Join Date
    Feb 2002
    Posts
    2,232
    What database server are you using ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •