开发者

integer datatype not work in linq to sql

Dear Freinds I face a problem that if i make a datattype in sql server of Integer an开发者_如何学Cd then use it in linq to sql query it give error of "specific cast not valid" and when i change datatype into varchar the linq to sql query work fine

one more thing how to use linq to sql query to make crystal report


Sounds like it cannot cast the system.integer type. Try the System.int32 type instead, which converts to sql int during linq sql type mapping.


'Dim addvou As New vr_detail With {.ac_no = DataGridView1.Rows(abcd).Cells(0).Value, .name = DataGridView1.Rows(abcd).Cells(1).Value, .credit = DataGridView1.Rows(abcd).Cells(3).Value, .cust_no = TextBox9.Text, .debit = DataGridView1.Rows(abcd).Cells(2).Value, .vend_no = TextBox2.Text, .vr_date = DateTimePicker1.Text, .vr_no = TextBox1.Text, .post_date = DateTimePicker3.Text, .vr_type = ComboBox1.Text, .sub_ac = DataGridView1.Rows(abcd).Cells(4).Value, .head_ac = DataGridView1.Rows(abcd).Cells(5).Value, .main_ac = DataGridView1.Rows(abcd).Cells(6).Value}

            voucher.vr_details.InsertOnSubmit(addvou)
            voucher.SubmitChanges()'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜