I when try to datagrid update get the following error.
there are 3 ID columns.
So my code
And error 'Input string was not in a correct format.'
I when try to datagrid update get the following error.
there are 3 ID columns.
So my code
And error 'Input string was not in a correct format.'
DataGrid Update Command in Web Application
PaulDotNet
thaks J.13.Leach but again get error.
Error:
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Giber
get rid of the "[" and the "]" In your parameters, like @[Grsln Kisi] and they should be one word like @GrslnKisi
Its ok to use the "[" when you are refering to column names in your table but not in SQL Parameters
Here is what it the command text etc.
SqlCom.CommandText = "UPDATE Gorusmeler SET Grsmid=@Grsmid, FirmaID=@FirmaID, [Gorusme Turu]=@Gorusme Turu, Projeid=@Projeid, Konu=@Konu, [Grsln Kisi]=@GrslnKisi, Sonuc=@Sonuc, [Not]=@Not, [Gorusme Zamani]=@GorusmeZamani, [Gorusme Yeri]=@GorusmeYeri WHERE Grsmid=@Grsmid"
SqlCom.Connection = SqlCon
With SqlCom.Parameters
.Add("@Grsmid", GorusmeID)
.Add("@FirmaID", FirmaID)
.Add("@GorusmeTuru", GTuru.Text)
.Add("@Projeid", ProjeID)
.Add("@Konu", konu.Text)
.Add("@GrslnKisi", GrslnKisi.Text)
.Add("@Sonuc", sonuc.Text)
.Add("@Not", note.Text)
.Add("@GorusmeZamani", gZamani.Text)
.Add("@GorusmeYeri", gYeri.Text)
hanjg82
thank you kimble
Kevinmac
That error would typically indicate that the value of e.Item.Cells(0).Text is not a value that can be converted to an integer. When the code fails, what does the debugger list as the value of e.Item.Cells(0).Text