CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Microsoft VBScript runtime (0x800A01A8) Object required:

Print topic Send  topic

Author Message
mike7418

Posts: 5
Posted: 07/01/2008, 7:20 AM

I have a form that is suppose to show a bit if text pulled from the database on a label object. I am getting that text in the Page_BeforeShow(Sender) function, but I am receiving this:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'mctcRegistrants.lblstrCourseNameDateLocation'
/counterdrugtraining/counterdrug_registration_events.asp, line 77

Line 77 is: mctcRegistrants.lblstrCourseNameDateLocation.value=rsRecords("strCourse")

The code for this is:
  
Function Page_BeforeShow(Sender) 'Page_BeforeShow @1-A1547E8B  
  
'Custom Code @33-73254650  
' -------------------------  
dim strSQL  
strSQL="SELECT mctcCourses.varCourseName + ', ' + mctcOfferings.varLocation + ': ' + CAST(MONTH(mctcOfferings.dteStarts) AS varchar(2)) + '/' + CAST(DAY(mctcOfferings.dteStarts) AS varchar(2)) + '/' + CAST(YEAR(mctcOfferings.dteStarts) AS varchar(4)) + ' - ' + CAST(MONTH(mctcOfferings.dteEnds) AS varchar(2)) + '/' + CAST(DAY(mctcOfferings.dteEnds) AS varchar(2)) + '/' + CAST(YEAR(mctcOfferings.dteEnds) AS varchar(4)) AS strCourse, smlMCTCRegister, varAlternateRegister "  
strSQL= strSQL & " FROM mctcOfferings INNER JOIN mctcCourses ON mctcOfferings.idCourse = mctcCourses.idCourse WHERE (mctcOfferings.idOffering =" & CCGetParam("idOffering", 0) & ")"  
response.Write strSQL  
dim rsRecords, strErrors  
strErrors=CCOpenRS(rsRecords,strSQL, DBConnection1.connection, 1)  
if strErrors<>"" then  
	response.write strErrors  
end if  
If Not rsRecords.EOF Then  
mctcRegistrants.lblstrCourseNameDateLocation.value=rsRecords("strCourse")  
End If  
  
if (rsRecords("smlMCTCRegister")=0) then  
	lblAlternateRegistration.value=rsRecords("varAlternateRegister")  
	mctcRegistrants.visible=false  
end if  
  
  
  
  
set rsRecords=nothing  
' -------------------------  
'End Custom Code  
  
End Function 'Close Page_BeforeShow @1-54C34B28  

I have tried everything I can think of and am running out of patience trying to troubleshoot any longer. If someone has any ideas I will be most appreciative.
Mike
View profile  Send private message
Oper


Posts: 1195
Posted: 07/01/2008, 11:45 AM

rsRecords("strCourse")

vs

rsRecords.fields("strCourse")


maybe i'm reading wrong your code.

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.