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

passing variable into a connection

Status
Not open for further replies.

HebieBug

Programmer
Jan 8, 2001
354
JP
Have created an asp page that takes specific record from a database. The COM + (dll) works fine. I just can't seem to access it from ASP. It will produce the record if I alter the DLL to specify the primarykeyID in the SQL string and don't add the IDNumber integer into the ASP page. I just can't seem to call the variant into the set objRS line. Anyone know what I am doing wrong?
dim IDNumber
dim FA
IDNumber = "10"
Set objAccount = Server.CreateObject"FieldAgents.ShowAll")
Set objRS = objAccount.FADetail(=IDNumber) -> have also tried .FADetail(IDNumber)
FA = objRS("ConsultantsName")
%>
 
Maybe it's expecting a number, and you are sending it a string:

IDNumber = "10"

change to:

IDNumber = 10

and sending it to the function, it should be:
objAccount.FADetail(IDNumber)

the one you had w/out the '='

hope that helps! :)
Paul Prewett
penny.gif
penny.gif
 
Something very odd. Restarted the COM + service and web site suddenly it works fine.
Chalk it up to the mystery of computers

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top