Can someone please help me to understand why I am getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'Lab@xyz.org'.
/trainingSessions/SQLRuns2.asp, line 58
strSQL3 = "UPDATE _Employees SET Pager = e.LName + ""Lab@xyz.org"" FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = " & Session("strPIID")
set rsEMP = oConn.Execute(strSQL3)
This is the result in SQL Server Profiler:
UPDATE _Employees SET Pager = e.LName + "Lab@xyz.org" FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = 7165
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Ok I changed it to this and am getting this new error:
strSQL3 = "UPDATE _Employees SET Pager = e.LName + 'Lab@xyz.org' FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = " & Session("strPIID")
Microsoft OLE DB Provider for ODBC Drivers error '80040e57'
[Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated.
/trainingSessions/SQLRuns2.asp, line 58
slightwv (䄆 Netminder)
What is the data type lengths for LName and Pager? Make sure you have enough room in the Pager column to store the maximum length of the LName columns and the extra 'Lab@xyz.org'
Andrew
ASKER
Pager column was varchar(30)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
slightwv (䄆 Netminder)
What is LName? If it is 30, then you might have a problem.
strSQL3 = "UPDATE _Employees SET Pager = e.LName + 'Lab@xyz.org' FROM _Employees e INNER JOIN _Department d ON e.reportsto = d.DeptHead WHERE e.isactive = 1 AND e.isScientific= 1 AND e.reportsto = " & Session("strPIID")
Microsoft OLE DB Provider for ODBC Drivers error '80040e57'
[Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated.
/trainingSessions/SQLRuns2