Click here to Skip to main content
15,916,842 members
Home / Discussions / C#
   

C#

 
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 
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 
You're trying to assign a Text (String) value to an Sql Int type several times. Your bad lines are in bold:
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();

You also don't need parenthesis arounf any of these identifiers either. How can you assign .Text values to Integer and Float values? You'll have to convert these strings to their numeric data types as dictated by your parameter requirements before you assign them.



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

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 
GeneralItem reordering in a large icon ListView Pin
Anonymous23-Apr-05 11:57
Anonymous23-Apr-05 11:57 
GeneralRe: Item reordering in a large icon ListView Pin
Anonymous24-Apr-05 11:03
Anonymous24-Apr-05 11:03 

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.