So I've got an interesting problem. I'm working with VB modifier (VBA) in Microsoft GP2013, and all I want to do is reference a table in one of our databases, grabbing total amount of call hours based on the service call number (job number) entered. To do so, I have opened an SQL connection, with an SQL command to do so. The problem is, I consistently get conversion errors regardless of how I convert the data coming in, and the data the SQL command is referencing. Here is the error I get:
Conversion failed when converting the varchar value 'Rack build' to data type int.
Here is the command string:
cmdString.CommandText = "SELECT SUM(TRXHRUNT)/100 from CTI_Timetrack_Open_and_Closed where TRXDSCRN = " & CallNumber.Value & ""
Where CallNumber.Value is an integer being populated by our form. I've wrapped my head around this all day, and the answer is probably very simple. I am looking for any advice to alleviate this error. Thanks.
TRXHRUNT-- are you attempting tosumavarchar?TRXHRUNTorTRXDSCRNhas a value of'Rack build'for one of the records.