Nathaniel
|
| Posted: 06/11/2003, 5:37 PM |
|
Using CCS 2.1.1.20
ASP
New user here!
I am attempting to use the CCDLookup function in the "Before Insert" event of a record form.
I am getting the follwoing error message.
Variable is undefined: 'adminDB'
/admin/class_registration_events.asp, line 13
adminDB is my database connection.
Listed below is a copy of the code.
I am getting the following error
CurrentCount = CCDLookUp("ClassCount","Classes","ClassID="&student.ClassID.value, adminDB) + 1
MaxCount = CCDLookUp("ClassMaxNumber","Classes","ClassID="&student.ClassID.value, adminDB)
If CurrentCount <= MaxCount Then
InsertAllowed = True
Else
InsertAllowd = False
End if
error message below
Variable is undefined: 'adminDB'
/admin/class_registration_events.asp, line 13
|
|
|
 |
Karen
|
| Posted: 06/11/2003, 6:04 PM |
|
You should define your database connection as a global variable first. In PHP like this:
global $DBconnection;
Hope that helps!
|
|
|
 |
rrodgers
|
| Posted: 06/11/2003, 6:06 PM |
|
If you named your Connection in the project properties
'adminDB'
Then CCS Created a Variable to hold the connection named
'DBadminDB'
rob
|
|
|
 |
Nathaniel
|
| Posted: 06/12/2003, 2:52 AM |
|
Thanks Karen & RRodgers for your help
I simply added the "DB" to my database connection and it solved my problem. Have a great day where ever you are.
Nate
|
|
|
 |
|