If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Unspecified Error...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-22-03, 15:36
PFXCarty PFXCarty is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 11-23-03, 01:11
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
What is actually returned when it errors out ?
Reply With Quote
  #3 (permalink)  
Old 11-23-03, 07:02
PFXCarty PFXCarty is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
Nothing specific, just Internal Error 500 or whatever.
Reply With Quote
  #4 (permalink)  
Old 11-23-03, 22:08
rnealejr rnealejr is offline
Registered User
 
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 ?
Reply With Quote
  #5 (permalink)  
Old 11-23-03, 22:09
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
What database server are you using ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On