Brandy
|
| Posted: 04/25/2003, 1:54 PM |
|
I am trying to add a hidden "employee_id" field to AutoUpdate new tasks.
Here is the error and here is the code. I don't understand why there are problems with the database.
Does anyone know where to go change this?
Error Type:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'DBServCustDB'
/intranet/serv/custreq/Custreq_maint_events.asp, line 15
Browser Type:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Page:
GET /intranet/serv/custreq/Custreq_maint.asp
if custreq.EditMode then
custreq.employee_id.Value = CCDLookUp("emp_name", "employees", "emp_id=" & CCToSQL(custreq.employee_id.Value,"Integer"), DBServCustDB)
else
custreq.employee_id.Value = CCDLookUp("emp_name", "employees", "emp_id=" & CCToSQL(CCGetUserID, "Integer"), DBServCustDB)
end if
|
|
|
 |
Edd
|
| Posted: 04/25/2003, 11:03 PM |
|
Brandy,
You need to verify the basics.
1.Verify that the spelling of 'DBServCustDB' is correct and matches your connection.
2.You are doing this in which event?
3.Try this to see if this works
Dim DBConn
Set DBConn = new clsDBServCustDB
DBConn.Open
if custreq.EditMode then
custreq.employee_id.Value = CCDLookUp("emp_name", "employees", "emp_id=" & CCToSQL(custreq.employee_id.Value,"Integer"), DBServCustDB)
else
custreq.employee_id.Value = CCDLookUp("emp_name", "employees", "emp_id=" & CCToSQL(CCGetUserID, "Integer"), DBServCustDB)
end if
DBConn.Close
Set DBConn = nothing
Hope this helps 
Edd
|
|
|
 |
|