Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: ERROR: String or binary data would be truncated.


Message #1 by kayandipo@h... on Wed, 22 Aug 2001 15:40:22
I am trying to update a DB as below:

UPDATE so_order_details SET Desp_no = '"& Desp_no &"', Inv_no = '"& Inv_no 

&"', Desp_date = '"& Desp_date &"' where order_id = '"&Temp(check)&"' 



Initially I had an error complaining about converssion of char to 

smalldatetime being impossible so I changed the data type from 

smalldatetime to char to make life easy now I have the error: 



Microsoft OLE DB Provider for ODBC Drivers error '80040e57' 



[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would 

be truncated. 

 Can someone help PLEASE!!!!!!!!!!!

   
Message #2 by "Drew, Ron" <RDrew@B...> on Wed, 22 Aug 2001 11:03:09 -0400
Try...

Not knowing what Temp(check) is and Assuming that order_id is a character

field and not numeric



mySQL = "UPDATE so_order_details SET Desp_no = '" & Desp_no & "', "

mySQL = mySQL & "Inv_no = '" & Inv_no & "', "

mySQL = mySQL & "Desp_date = '" & Desp_date "' "

mySQL = mySQL & "where order_id = '" & Temp(check) & "'"



set rstemp=conntemp.execute(mySQL)



 

SET Desp_no = '" & Desp_no & "', Inv_no = '" & Inv_no & "', Desp_date = '" &

Desp_date & "' 

where order_id = '" & Temp(check) & "' 





-----Original Message-----

From: kayandipo@h... [mailto:kayandipo@h...]

Sent: Wednesday, August 22, 2001 11:40 AM

To: ASP Web HowTo

Subject: [asp_web_howto] ERROR: String or binary data would be

truncated.





I am trying to update a DB as below:

UPDATE so_order_details 

SET Desp_no = '" & Desp_no & "', Inv_no = '" & Inv_no & "', Desp_date = '" &

Desp_date & "' 

where order_id = '" & Temp(check) & "' 



Initially I had an error complaining about converssion of char to 

smalldatetime being impossible so I changed the data type from 

smalldatetime to char to make life easy now I have the error: 



Microsoft OLE DB Provider for ODBC Drivers error '80040e57' 



[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would 

be truncated. 

 Can someone help PLEASE!!!!!!!!!!!


  Return to Index