winteranghel 0 Newbie Poster
Dim generate As String
                        Dim added As Integer
                        Dim addends As Integer
                        Dim sum As Integer
                        Dim zero As String
                        zero = "000"
                        plus.Text = "1"
                        added = Int32.Parse(idrecever.Text)
                        addends = Int32.Parse(plus.Text)
                        sum = added + addends
                        generate = "00000"

                        SqlText = "INSERT INTO Tbl_Items(ItemID, item_name, color, manufacturer, barcode, vendor, item_category, non_stockable, weight, vendors_price, selling_price, image) " _
                                & "VALUES('ITM'+CONVERT(varchar(99),RIGHT(Year(GETDATE()),2)+'" & generate & "'+'" & Int32.Parse(sum) & "'+day(GETDATE())*1000,12),'" & TextItemDesc.Text & "'," _
                                & "'" & ComboColor.Text & "', '" & ComboManufacturer.Text & "', '" & TextBarcode.Text & "', " _
                                & "'" & ComboVndr.Text & "','" & ComboCategory.Text & "', " _
                                & "'" & DateExpiry.Text & "','" & [ICODE][/ICODE]TextWeight.Text & "', " _
                                & "'" & TextVdrPrce.Text & "','" & TextSlePrce.Text & "', '&arrImage&')"

                        comm.CommandText = SqlText

Please help me with this..this code was working with my classmates program but when i try it on my own,it returns the exception input string was not in the correct format.. i don't see any difference between our codes that's why i'm so confused why it is not working for me.. anyway, my goal was to create a unique item id for my table items such that ITM00001 or the like.. if there's anymore way to do this can you please post it here..thanks a lot..