Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Troubleshooting "An error has occurred.."

Status
Not open for further replies.

MBurns

Programmer
Oct 13, 1999
5
US
Does anyone know of a comprehensive guide for determining what is wrong when the dreaded "An error has occurred on the server in attempting to access the data source" message comes up in ASP? I think I saw one somewhere once but maybe i was imaging it.
 
Isn't this the standard message meaning that your connection string is wrong? Have you been able to successfully connect to your DB in asp? If not, then you need to get the string exactly right. I don't have an example on me at the moment. :(
 
My connection string is okay. It works fine under "normal" circumstances. I get the error on one report where I am trying to add/change a formula through ASP. There is obviously something about the way I am creating the formula that makes the server complain.
 
What database are you using and can you show the code that's causing the error here?
 
Here is the code I use to set the formula for {@Col 1}:

set formulafields = session("oRpt").FormulaFields
For i = 1 to formulafields.Count
match1 = strcomp(formulafields.Item(cint(i)).Name,"{@Col 1}")
If match1 = 0 then
formulafields.Item(cint(i)).text = Request.Form("dollars1")
end if
next

In this example, Request.Form("dollars1") would look something like this:
"{Equity_Activity.Crnt_Assets_Mgd}+{Equity_Activity.Crnt_Assets_NonMgd}"
This formula will work fine if I put it directly into {@Col 1} and don't try to change it through code. It will even work once using the above code, but running it the second time is when I get the error. I think I would be in better shape if it never worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top