Hi all,
I am facing below problem. Your help is really appreciated.
Cannot perform '=' operation on System.Int32 and System.String.
What I tried to do here is I have a dataset get from SQL Express 2005 and I am adding a new row to it and it hit the above error.
I combine 3 tables in SQL and return the data to my win application.
And I add 1 row to it.
Here is the data type in my sql statement.
And Here is my code in vb.netCode:SELECT cd.indexNo, c.custid, c.companyname, c.contactperson, c.contactno, dt.Type, cdm.DrawingMaterial, cd.Size, cd.Roundness FROM rpts_customer As c, rpts_custdiesdetail As cd, rpts_Type As dt, rpts_CustDrawMaterial As cdm WHERE c.custID = cd.custID AND cd.cdmNo = cdm.cdmNo AND cd.dtNo = dt.dtNo AND c.Active = 'TRUE' ORDER BY dt.Type indexNo = Integer (which is an auto increasement column in master table) custID = Integer (same as indexNo, auto increase) companyName = VarChar(50) contactperson = VarChar(50) contactno = VarChar(50) Type = VarChar(50) DrawingMaterial = VarChar(50) Size = Numeric(10,6) Roundness = Numeric(10,6) dtNo = Int (auto increase) cdmNo = Int (auto increase) Active = Bit
VB.Net Code:
Dim dRow As DataRow = dSet.Tables("tblCustDetail").NewRow dRow.Item(DBFN_IndexNo) = 1 dRow.Item(DBFN_CustID) = txtCustID.Text.Trim dRow.Item(DBFN_CompanyName) = txtCompanyName.Text.Trim dRow.Item(DBFN_ContactPerson) = txtContactPerson.Text.Trim dRow.Item(DBFN_ContactNo) = txtContact.Text.Trim dRow.Item(DBFN_Type) = cboType.Text dRow.Item(DBFN_DrawingMaterial) = cboDrawingMaterial.Text dRow.Item(DBFN_Size) = txtSize.Text.Trim dRow.Item(DBFN_Roundness) = txtRoundness.Text.Trim dSet.Tables("tblCustDetail").Rows.Add(dRow)
Anybody has any idea???
I'm out of solution. I checked the Database fields and its the same. No differences.
I don't know what should I do...
Help..
Thanks.
scsfdev






Reply With Quote
