Brian Bermingham
|
| Posted: 08/07/2002, 8:24 AM |
|
Can anybody tell me why this is not working properly?
As it stands all the values are inserted into the Delegates table except the Last_Name.
It seems to be the fact that Employee.Last_Name.Value is text.
If anybody has any suggestions I would be very grateful, I've spent hours trying to get this to work.
Dim strSQL
strSQL = "INSERT INTO Delegates ( Course_ID, HR_Number, Employee, Last_Name, First_Name, Manager_Name, Accepted ) "
strSQL = strSQL & "SELECT ""02/07/04-13"" AS Course_ID, "
strSQL = strSQL & Employee1.HR_Number.Value & " AS HR_Number, "
strSQL = strSQL & "-1 AS Employee, "
strSQL = strSQL & CCToSQL(Employee1.Last_Name.Value,"Text") & " AS Last_Name, ""Brian"" AS First_Name,"
strSQL = strSQL & """Man"" AS Manager_Name,"
strSQL = strSQL & " -0 AS Accepted;"
DBcnnTraining.Execute(strSQL)
Thanks
Brian
|
|
|
 |
Nicole
|
| Posted: 08/08/2002, 1:57 AM |
|
Brian,
have you tried to print Last_name value? Please try:
response.write CCToSQL(Employee1.Last_Name.Value,"Text")
you should get the printed string like:
'last_name value'
Are you able to print just value without applying CCToSQL() function? Do you get correct value printed?
|
|
|
 |
Brian Bermingham
|
| Posted: 08/08/2002, 2:38 AM |
|
Nicole
Thanks for the reply.
You were right CCToSQL(Employee1.Last_Name.Value,"Text") was empty
However this morning, after a nights sleep I resolved the problem by approaching it in a completely different way. By letting CCS do the work.
It's very easy to get stuck with a single train of thought when the solution is much simpler.
I'll be looking for the simpler solutions in the future they are useually the best.
Again Thanks for your time.
Brian
|
|
|
 |
|