Hello.. Example: there are 2 textbox, where i'll type a numeric value this is the value in the first 2 textbox, textBox1=500 textBox2=1000 then in textBox3 the sum of the 2 values in the textbox should be automatically generated without triggering it with a button. Example, i just finish typing those numbers and when i'll press tab in my keyboard, texBox3 should display=1500 how will i code it? thanks.
icesha
Posts
-
computing the numeric value of 2 textbox without triggering with a button? (Windows Application) -
please check the code.. there's an error in adding a record in the database...OleDbConnection connect=new OleDbConnection(); connect.ConnectionString="Provider=DB2OLEDB; initial catalog=SAMPLE;integrated security=SSPI,user id=db2admin;password=eugene09"; connect.Open(); OleDbCommand cmd_save =new OleDbCommand("INSERT INTO test(name,year,course)"+"VALUES("+"'"+textBox1.Text+"'"+","+"'"+textBox2.Text+"'"+","+"'"+textBox3.Text+"'"+")",connect); int intRow=cmd_save.ExecuteNonQuery(); if(intRow>0) { MessageBox.Show("Record added"); } connect.Close(); this is a program i created adding a record in the database but their is no error but an exception, saying " DB2OLEDB is not existing in the local machine." i think the problem is in the insert command. thanks for all the help!
-
please check if the DB2OLEDB connection string is correct.OleDbConnection connect=new OleDbConnection(); connect.ConnectionString="Provider=DB2OLEDB; initial catalog=SAMPLE;integrated security=SSPI,user id=db2admin;password=eugene09"; connect.Open(); OleDbCommand cmd_save =new OleDbCommand("INSERT INTO test(name,year,course)"+"VALUES("+"'"+textBox1.Text+"'"+","+"'"+textBox2.Text+"'"+","+"'"+textBox3.Text+"'"+")",connect); int intRow=cmd_save.ExecuteNonQuery(); if(intRow>0) { MessageBox.Show("Record added"); } connect.Close(); this is a program i created adding a record in the database but their is no error but an exception, saying " DB2OLEDB is not existing in the local machine." i think the problem is in the insert command. thanks for all the help!
-
please check if the DB2OLEDB connection string is correct.oConn.Open = "Provider=DB2OLEDB;" & _ "Network Transport Library=TCPIP;" & _ "Network Address=xxx.xxx.xxx.xxx;" & _ "Initial Catalog=MyCatalog;" & _ "Package Collection=MyPackageCollection;" & _ "Default Schema=MySchema;" & _ "User ID=MyUsername;" & _ "Password=MyPassword" this is the connection string i got from a site. How will apply it in my program: OleDbConnection connect=new OleDbConnection(); connect.ConnectionString="Provider=DB2OLEDB; initial catalog=SAMPLE;integrated security=SSPI,default schema=jefoy"; connect.Open(); OleDbCommand cmd_save =new OleDbCommand("INSERT INTO test(name,year,course)"+"VALUES("+"'"+textBox1.Text+"'"+","+"'"+textBox2.Text+"'"+","+"'"+textBox3.Text+"'"+")",connect); cmd_save.ExecuteNonQuery(); connect.Close(); will i place it as it is or will i change the schemas and the other items? its not working. Maybe somethings wrong. Thanks...
-
connection string for OLEDB2 provider..using C#and also the site that you give is not valid.. thanks..
-
connection string for OLEDB2 provider..using C#thanks.. its now running. But the problem is that i cant save data on the database. The exception is that the provider=DB2OLEDB is not available in the local machine. it highlights the statement where i insert values. thanks.
-
connection string for OLEDB2 provider..using C#please.. i need a sample... or please check if somethings wrong in this program..its not saving..and i think the connection string is not valid but it doesnt build any errors until you save in the database. OleDbConnection connect=new OleDbConnection(); connect.ConnectionString="PROVIDER=DB2OLEDB; initial catalog=SAMPLE;integrated security=SSPI"; connect.Open(); OleDbCommand cmd_save =new OleDbCommand("INSERT INTO test(name,year,course)"+"VALUES("+"'"+textBox1.Text+"'"+","+"'"+textBox2.Text+"'"+","+"'"+textBox3.Text+"'"+")",connect); cmd_save.ExecuteNonQuery(); connect.Close(); thanks for the help..
-
Windows Applications Problems in C#..please i need help..thank you..im copying thw whole application when i tried to erase the exe file in the debug folder its just the same. it keeps showing the form that's not meant to be shown... is there a way that i could run it with the new content? its very frustrating...thanks for your help...
-
Windows Applications Problems in C#..please i need help..thank you..Im sure its building.. its compiling the whole application but it keeps showing the last form compiled.. i think the problem is because of its the copied file?
-
Windows Applications Problems in C#..please i need help..thank you..Umm.. Im currently using visual studio 2005 and my problem is everytime i create a copy of a windows application project..(example WIndowsApplications2) and i change its content using another pc..and everytime i compile it.. the original contents are the ones shown in the screen.. not the new thing i have already change... and everytime i change the first form to be displayed in the program.cs the form that is being displayed is the last form being compiled. For example i've change it to form5 but its showing Form12... please help... thank you very much...
-
How can i connect C# to a IBM db2 server?My question is What is the exact syntax to connect? i mean its our first tym using IBM DB2 server and its kinda hard. We've connected the DB2 to C# by the components but the exact syntax for opening a connection or closing or inserting an item to the table is a real question...thank you very much...