Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override void Write(ref Data.DataHolder holder)
- {
- //set the db type
- holder.Parameter.DbType = System.Data.DbType.String;
- //if there is no value we could specify what to set the db field to
- if (holder.NoValue)
- {
- //in this case we just want to set it to null
- holder.Parameter.Value = null;
- }
- else
- {
- //When there is a value we simply need to take our CLR int, and convert it to a string
- //and then set the parameter info
- string s = holder.Int32Value.ToString();
- holder.Parameter.Size = s.Length;
- holder.Parameter.Value = s;
- }
- }
Add Comment
Please, Sign In to add comment