-
ASP Error {Resolved}
I have a client that just sent a site over they created and wants me to host it an provide FTP access...so I have everything setup. They have it coded to use a system dsn, which I have setup but I keep getting this error.
Code:
Provider error '80004005'
Unspecified error
/registration.asp, line 130
the code is...and the error line is in red.
Code:
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_fileagem_STRING
Recordset1.Source = "SELECT * FROM Customers"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
I can't figure it out...anybody got any ideas?
-
What is MM_fileagem_STRING set to?
I presume it's the connection string that references the DSN but has it been set properly?
-
the page includes a file that contains the MM_fileagem_STRING variable and it is set to a system DSN.
Code:
Dim MM_fileagem_STRING
MM_fileagem_STRING = "dsn=fileagem;"
-
My first reaction was "***?!".... ActiveConnection is supposed to be a CONNECTION object, not a string....
First the connection object should be opened, then that should be 1)Set as the active connection or 2) Passed in as part of the RS.Open parameters......
Never seen it done this way before.....
-
I haven't seen it done this way either, that's why I am having the problem trying to figure out why this error keeps happening...Just keeps returning "Unspecified Error" and that's it....
-
well, it seems as if who ever designed this allowed dreamweaver to create the connection to the db and handle all of that.
When I replaced MM_fileagem_STRING with "dsn=fileagem;" it worked...but only once...then I got the same error again.
-
You *should* be able to use a conn str or an object with the active connection. Byt I've always used the object as well.
So you may want to experiment with that approach to see if the conn object can be opened using the DSN. Since it's code your client provided it *should* have worked somewhere before... unless he's using you as a tester/debugger as well.
-
well, after scouring the internet for the past 36 hours I found the solution...The MM_fileagem_STRING = "dsn=fileagem;" needed to be changed to "dsn=fileagem;uid=;pw=;"....yep, that ****ing solved it!
-
MM_
that MM_ code is autogenerated by Macromedia Dreamweaver Ultradev and MX. it can be nightmarishly difficult to edit by hand, but it's not necessary to do so.
open the file in DW MX or Ultradev and look at the "Application" window, usually found on the right side of the screen if using an MX-style layout. in this window, choose the tab called "Server Behaviors".
there will be a list of dynamic objects that represent the Macromedia server objects associated with the MM_ code. One of or more of these entries will be red. double-click the red items and associate them with an appropriate DNS connection. if you don't have one of these, click over to the Databases tab in the Application window and you can make one.
pretty easy stuff once you realize there's no need to have to try to read that auto-code.
joe
-
dude, this thread was resolved 10 days ago.
-
resolved
for the original poster.
most of the overall value here though is the cumulative knowledge the site contains. i found value in contributing more precise experience about that issue, as it's something that occurs more frequently as more source code and purchased scripts get out and about in the world that originated in DW.
glad that you're squared away on it. me too.
joe