I have the following table shortened:
CREATE TABLE [dbo].[TERMINAL] ( [TERM_CODEID] SMALLINT NOT NULL, [TERM_ACTIVE] SMALLINT NOT NULL, [TERM_NAME] VARCHAR (30) NOT NULL, [TERM_SLA] CHAR (8) NOT NULL, [TERM_SERIAL] VARCHAR (8) NULL, [TERM_VERSION] VARCHAR (8) NULL, [TERM_STATUS] INT NULL, )
When I try the following Dapper code - and I'm a complete Dapper newbie, found it yesterday - I get an error message:
using (var conn = new SqlConnection("data source=ourServer; initial catalog=ourDb;user id=sa;password=ourPassword;")) { conn.Open(); var terms = conn.Query<Terminal>("select * from TERMINAL"); }
Error:
Column 3 parsing analysis (TERM_SLA = 01010B01 - String)
I see no reason why something should even โparseโ the string, but you donโt need to experience an error. What could be the reason for this>
source share