My Linux-to-SQL program is returning a lot of values from my SQL Server database, some of which may be null
If the I need to know how I can manage them effectively when keeping my code organized. Before I join the table, I change my door: Now to make sure that my Dataro Faucet I can handle it, I can just do it, but it is not necessary. But in the decimal field I have to do this: Now what do I have to do about 50 of these To accept DataTable column is inserted as a string, this is not a problem, though when it is inserted in decimal form, when I get an error message Can not be decimal.
// DataTable DataTable.dt = create new datatellas (); Dt.Columns.add ("deal", typef (string)); Dt.Columns.add ("value", type (decimal) - typef (dbbull)); // Create LINQ query by var query = quer select new in table {quer.deal_id, quer.price};
var datarows = query.Select (r = & gt; {var row = Dt.NewRow (); line ["deal"] = R.Diggle_Aud; line ["value"] = R.Pricease;}
if (r.price == DBNull.Value) {line ["value"] = zero;}
if I make a comment per table What can I do? Can I pass it in a function?
DBNull value, you can set your
DataColumn :
// datatable dataTableDT = new datatyll (); dt. Columns.add (new data columns ("deal", typef (string)); Dt.Columns.add (create new data columns ("value", typef (decimal)) {AllowDBNull = true}; // Create LINQ query by var query = quer select new in table {quer.deal_id, quer.price};
No comments:
Post a Comment