Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 21:04
monuSaini10-Jul-07 21:04 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
Nisar Inamdar10-Jul-07 21:15
Nisar Inamdar10-Jul-07 21:15 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 21:27
monuSaini10-Jul-07 21:27 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
Nisar Inamdar10-Jul-07 22:25
Nisar Inamdar10-Jul-07 22:25 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
valerian.precop10-Jul-07 21:25
valerian.precop10-Jul-07 21:25 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 21:46
monuSaini10-Jul-07 21:46 
QuestionException Pin
sangramkp10-Jul-07 19:27
sangramkp10-Jul-07 19:27 
AnswerRe: Exception Pin
valerian.precop10-Jul-07 20:36
valerian.precop10-Jul-07 20:36 
why do you use those two parameters @p1 and @p2 when you can simply do something like this:

string sql = "INSERT INTO tblPassages (column_num, row_num) VALUES ('" + item[0] + "','" + item[1] + "')";
I presume that column_num and row_num are string values in the database.

Usually you use parameters when you use a stored procedure to execute a query.
So you don't need these lines

SqlParameter p1 = new SqlParameter("@p1", item[0]);
SqlParameter p2 = new SqlParameter("@p2", item[1]);
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
p1.SqlDbType = SqlDbType.VarChar;
p2.SqlDbType = SqlDbType.VarChar;


Tell me if it helped... Smile | :)

Just call me Valy... Smile | :)

GeneralRe: Exception Pin
sangramkp10-Jul-07 21:17
sangramkp10-Jul-07 21:17 
GeneralRe: Exception Pin
Brady Kelly10-Jul-07 21:40
Brady Kelly10-Jul-07 21:40 
GeneralRe: Exception Pin
Rhys Gravell10-Jul-07 22:33
professionalRhys Gravell10-Jul-07 22:33 
AnswerRe: Exception Pin
valerian.precop10-Jul-07 21:39
valerian.precop10-Jul-07 21:39 
GeneralRe: Exception Pin
mav.northwind11-Jul-07 8:52
mav.northwind11-Jul-07 8:52 
AnswerRe: Exception Pin
Rhys Gravell10-Jul-07 22:29
professionalRhys Gravell10-Jul-07 22:29 
Questionevent fire Pin
SwaSubhaVijju10-Jul-07 19:20
SwaSubhaVijju10-Jul-07 19:20 
AnswerRe: event fire Pin
_AK_10-Jul-07 19:37
_AK_10-Jul-07 19:37 
AnswerRe: event fire Pin
Vikram A Punathambekar10-Jul-07 19:43
Vikram A Punathambekar10-Jul-07 19:43 
GeneralRe: event fire Pin
SwaSubhaVijju10-Jul-07 19:54
SwaSubhaVijju10-Jul-07 19:54 
AnswerRe: event fire Pin
gauthee10-Jul-07 19:59
gauthee10-Jul-07 19:59 
AnswerRe: event fire Pin
gauthee10-Jul-07 20:04
gauthee10-Jul-07 20:04 
Questiondatagrid Pin
SwaSubhaVijju10-Jul-07 19:03
SwaSubhaVijju10-Jul-07 19:03 
AnswerRe: datagrid Pin
Sathesh Sakthivel10-Jul-07 19:18
Sathesh Sakthivel10-Jul-07 19:18 
GeneralRe: datagrid Pin
SwaSubhaVijju10-Jul-07 19:22
SwaSubhaVijju10-Jul-07 19:22 
GeneralRe: datagrid Pin
Sathesh Sakthivel10-Jul-07 19:26
Sathesh Sakthivel10-Jul-07 19:26 
GeneralRe: datagrid Pin
Steve Echols10-Jul-07 19:28
Steve Echols10-Jul-07 19:28 

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.