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

 Please help

Print topic Send  topic

Author Message
gummio

Posts: 11
Posted: 04/07/2004, 5:09 PM

Hi,

I am trying to use this but i always get the following error:
Object required: 'DBBilakerfi'

This is the code i am using

Dim SQL
Dim RecordSet
Dim KmStada
Dim Mismunur
Dim BillID
DIM DBBilakerfi

KmStada = CCGetValue(Bilar_Kilometrastada, "KmStada")BillID = CCGetValue(Bilar_Kilometrastada, "Bill_ID")

If KmStada >=0 Then
SQL = "SELECT MAX(KmStada) As Mismun FROM Bilar_Kilometrastada WHERE Bill_ID ="&BillID& " KmStada < "&KmStada

Set RecordSet = DBBilakerfi.Execute(SQL)

If Bilakerfi.Errors.Count = 0 Then
If Not RecordSet.EOF then
Mismunur = CCGetValue(RecordSet, "Mismun")
End if
RecordSet.Close
Set RecordSet = Nothing
End If
End if

The reordset has only one record to return.
View profile  Send private message
Tim
Posted: 04/07/2004, 7:06 PM

You need to create the connection object first, or if this is taking place within a CCS event on a page which has database calls you should just use the existing connection, changing

Set RecordSet = DBBilakerfi.Execute(SQL)

to

Set RecordSet = DByourconnectionname.Execute(SQL)

even better you could not use the recordset at all and just assign a value like this

VariableToHoldValue = DByourconnectionname.Execute(SQL).fields(0).value

Good Luck.
peterr


Posts: 5971
Posted: 04/07/2004, 11:04 PM

Please take a look at this example: http://docs.codecharge.com/studio/html/ProgrammingTechn...eCustomSQL.html
It shows how you can create the connection object.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
gummio

Posts: 11
Posted: 04/08/2004, 3:05 PM

Thanks for the help, i got it to work :-)
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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