Click here to Skip to main content
15,898,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: using the serial port Pin
Peter Ritchie24-Apr-05 8:21
Peter Ritchie24-Apr-05 8:21 
GeneralException handling problem.. Pin
23-Apr-05 13:51
suss23-Apr-05 13:51 
GeneralRe: Exception handling problem.. Pin
Carl Mercier23-Apr-05 14:03
Carl Mercier23-Apr-05 14:03 
GeneralRe: Exception handling problem.. Pin
Tugbay Sahin23-Apr-05 14:55
Tugbay Sahin23-Apr-05 14:55 
GeneralRe: Exception handling problem.. Pin
Carl Mercier23-Apr-05 16:43
Carl Mercier23-Apr-05 16:43 
GeneralRe: Exception handling problem.. Pin
Dave Kreskowiak23-Apr-05 17:31
mveDave Kreskowiak23-Apr-05 17:31 
GeneralRe: Exception handling problem.. Pin
Colin Angus Mackay23-Apr-05 22:48
Colin Angus Mackay23-Apr-05 22:48 
GeneralRe: Exception handling problem.. Pin
Tugbay Sahin24-Apr-05 7:15
Tugbay Sahin24-Apr-05 7:15 
Ok , this time I think it is a logic error r smth... her eis the full code:
private void Tamam_Click(object sender, System.EventArgs e)
{

SqlCommand myCommand = null;
myCommand = new SqlCommand("INSERT INTO CES VALUES(@i_cesit,@i_uzunluk,@i_capı,@i_uzunlugu,@i_kavisi,@arayuz,@kod,@stok,@g_fiyat,@s_fiyat)",Form1.myConnection);
try
{
myCommand.Parameters.Add("@i_cesit",SqlDbType.VarChar);
myCommand.Parameters["@i_cesit"].Value = ıplık_cesıtı.Text;
myCommand.Parameters.Add("@i_uzunluk",SqlDbType.Int);
myCommand.Parameters["@i_uzunluk"].Value = ıplık_capı.Text;
myCommand.Parameters.Add("@i_capı",SqlDbType.VarChar);
myCommand.Parameters["@i_capı"].Value = ıplık_capı.Text;
myCommand.Parameters.Add("@i_uzunlugu",SqlDbType.Int);
myCommand.Parameters["@i_uzunlugu"].Value = (ıgne_uzunlugu.Text);
myCommand.Parameters.Add("@i_kavisi",SqlDbType.VarChar);
myCommand.Parameters["@i_kavisi"].Value = ıgne_kavısı.Text;
myCommand.Parameters.Add("@arayuz",SqlDbType.VarChar);
myCommand.Parameters["@arayuz"].Value = ara_yuzu.Text;
myCommand.Parameters.Add("@kod",SqlDbType.VarChar);
myCommand.Parameters["@kod"].Value = urun_kodu.Text;
myCommand.Parameters.Add("@stok",SqlDbType.Int);
myCommand.Parameters["@stok"].Value = (stok_mıktarı.Text).ToString();
myCommand.Parameters.Add("@g_fiyat",SqlDbType.Float);
myCommand.Parameters["@g_fiyat"].Value = (bırım_fıyatı.Text);
myCommand.Parameters.Add("@s_fiyat",SqlDbType.Float);
myCommand.Parameters["@s_fiyat"].Value =(bırım_fıyatı.Text); myCommand.ExecuteNonQuery();
}
catch (Exception a)
{
MessageBox.Show(a.ToString());
}
}

It keeps giving an error like :



"System.FormatException: Input string was not in a correct format.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at CES.urun.Tamam_Click(Object sender, EventArgs e) in c:\documents and settings\şirin baba.aikanaro.002\desktop\ces\urun.cs:line 587"


o.k , what can be the problem , according to the articles found in net , there is nor mistake.. Has any one any idea?

Thanks a lot..
GeneralRe: Exception handling problem.. Pin
Colin Angus Mackay24-Apr-05 13:05
Colin Angus Mackay24-Apr-05 13:05 
GeneralRe: Exception handling problem.. Pin
Dave Kreskowiak24-Apr-05 16:22
mveDave Kreskowiak24-Apr-05 16:22 
GeneralRe: Exception handling problem.. Pin
Tugbay Sahin24-Apr-05 19:54
Tugbay Sahin24-Apr-05 19:54 
GeneralCreate a class an object dinamically with DataRow fields and values Pin
machocr23-Apr-05 13:18
machocr23-Apr-05 13:18 
GeneralRe: Create a class an object dinamically with DataRow fields and values Pin
machocr23-Apr-05 20:19
machocr23-Apr-05 20:19 
GeneralPocket PC mulitplayer Pin
Anonymous23-Apr-05 13:12
Anonymous23-Apr-05 13:12 
QuestionAssembly version? Pin
damir_tk23-Apr-05 13:11
damir_tk23-Apr-05 13:11 
AnswerRe: Assembly version? Pin
turbochimp23-Apr-05 17:29
turbochimp23-Apr-05 17:29 
GeneralRe: Assembly version? Pin
damir_tk23-Apr-05 23:24
damir_tk23-Apr-05 23:24 
GeneralRe: Assembly version? Pin
leppie24-Apr-05 4:40
leppie24-Apr-05 4:40 
GeneralRe: Assembly version? Pin
turbochimp24-Apr-05 7:10
turbochimp24-Apr-05 7:10 
GeneralRe: Assembly version? Pin
damir_tk24-Apr-05 8:12
damir_tk24-Apr-05 8:12 
Questionupdate problems? Pin
Snowjim23-Apr-05 13:04
Snowjim23-Apr-05 13:04 
GeneralReading nodes from an XML file please help! Pin
Anonymous23-Apr-05 12:41
Anonymous23-Apr-05 12:41 
GeneralRe: Reading nodes from an XML file please help! Pin
DavidNohejl23-Apr-05 12:59
DavidNohejl23-Apr-05 12:59 
GeneralAddContextMenuItem multiple files Pin
Clickok23-Apr-05 12:32
Clickok23-Apr-05 12:32 
GeneralRe: AddContextMenuItem multiple files Pin
MilesAhead23-Apr-05 16:43
MilesAhead23-Apr-05 16:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.