FindBy and using a column name that is non-C# standard

45 views
Skip to first unread message

wonderbison

unread,
Jun 21, 2012, 6:42:00 AM6/21/12
to simpl...@googlegroups.com
Hi
 
I want to find a record in a table but there are column names that are prefixed __$. Its a SQL Server CDC thing.
 
So the following is invalid
 

Db.schema.table.FindBy(__$start_lsn: 22)

I have tried it as a variable and surrounded the name in brackets and a couple of other ways but not much luck
 
Help appreciated
 
Robin

Mark Rendle

unread,
Jun 21, 2012, 6:45:34 AM6/21/12
to simpl...@googlegroups.com

Just use StartIsn, Simple.Data will resolve the internal database name from that.

Mark

wonderbison

unread,
Jun 21, 2012, 6:50:58 AM6/21/12
to simpl...@googlegroups.com
 
 
Hi
 
Thanks for the info. Can I ask how does it do that please?
 
Thanks

Mark Rendle

unread,
Jun 21, 2012, 7:54:42 AM6/21/12
to simpl...@googlegroups.com

It uses the database schema tables and finds objects (tables, columns, etc) which match only on alphanumeric characters.

wonderbison

unread,
Jun 21, 2012, 10:09:38 AM6/21/12
to simpl...@googlegroups.com
Clever stuff!!
 
Thanks
Reply all
Reply to author
Forward
0 new messages