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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveConnection Problem

Status
Not open for further replies.

PenguinHead

Programmer
Jan 5, 2007
18
US
I am trying to connect to an active connection already established by this include file.

Code:
<!--#include file="../Connections/V025U37YVR.asp"-->

set addEmail=Server.CreateObject("ADODB.Command")
addEmail.ActiveConnection = MM_V025U37YVR_STRING
addEmail.CommandText="UPDATE Login ..."
addEmail.Execute

Error:
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

Any ideas why this won't work?
 
Maybe put some debug code in to find out the value of the variable MM_V025U37YVR_STRING

[tt]
set addEmail=Server.CreateObject("ADODB.Command")
addEmail.ActiveConnection = MM_V025U37YVR_STRING
[highlight]Response.Write MM_V025U37YVR_STRING : Response.End[/highlight]
addEmail.CommandText="UPDATE Login ..."
addEmail.Execute
[/tt]
 
Actually the error message about arguments being the wrong type might not be a connection problem.

You might verify the SQL by adding debug code:
[tt]
set addEmail=Server.CreateObject("ADODB.Command")
addEmail.ActiveConnection = MM_V025U37YVR_STRING
addEmail.CommandText="UPDATE Login ..."
[highlight]Response.Write addEmail.CommandText : Response.End[/highlight]
addEmail.Execute
[/tt]

... of course you delete the debug code once you determine the value.
 
Unfortunately these Response.Write()'s you suggested only seem to return blank values which baffles me since this same connection works elsewhere in the same website.
 
Just because a variable has a particular value on some other page in a site doesn't automatically mean it will have the same value on all pages.

Or, perhaps MM_V025U37YVR_STRING is an Application or Session variable? If so then it just needs the proper syntax.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top