Click here to Skip to main content
15,921,210 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Horizontal scroll bar list box Pin
Arun Jacob31-Aug-09 23:40
Arun Jacob31-Aug-09 23:40 
QuestionHow to run multiple audio files in asp.net Pin
itsmitm31-Aug-09 21:33
itsmitm31-Aug-09 21:33 
AnswerRe: How to run multiple audio files in asp.net Pin
sashidhar31-Aug-09 21:45
sashidhar31-Aug-09 21:45 
Questionadding image in side a project folder Pin
ritasaumya31-Aug-09 21:14
ritasaumya31-Aug-09 21:14 
AnswerRe: adding image in side a project folder Pin
Coding C#31-Aug-09 21:22
Coding C#31-Aug-09 21:22 
AnswerRe: adding image in side a project folder Pin
Arun Jacob31-Aug-09 21:26
Arun Jacob31-Aug-09 21:26 
AnswerRe: adding image in side a project folder Pin
sashidhar31-Aug-09 21:36
sashidhar31-Aug-09 21:36 
Questionthe two web services provided in the article of Sending messages in asp.net through we service ???? Pin
Ritu_1631-Aug-09 20:55
Ritu_1631-Aug-09 20:55 
AnswerRe: the two web services provided in the article of Sending messages in asp.net through we service ???? Pin
Christian Graus31-Aug-09 21:05
protectorChristian Graus31-Aug-09 21:05 
JokeRe: the two web services provided in the article of Sending messages in asp.net through we service ???? Pin
Arun Jacob31-Aug-09 21:24
Arun Jacob31-Aug-09 21:24 
Questiononscroll event not fire in IE 6 with select box i need to call Javascript on onscroll event Pin
anish27patel31-Aug-09 20:48
anish27patel31-Aug-09 20:48 
QuestionHow to retrieving the binary data from the database? Pin
abglorie31-Aug-09 20:25
abglorie31-Aug-09 20:25 
AnswerRe: How to retrieving the binary data from the database? Pin
Christian Graus31-Aug-09 20:30
protectorChristian Graus31-Aug-09 20:30 
Questionupdate database Pin
mylogics31-Aug-09 20:20
professionalmylogics31-Aug-09 20:20 
AnswerRe: update database Pin
Christian Graus31-Aug-09 20:34
protectorChristian Graus31-Aug-09 20:34 
GeneralRe: update database Pin
mylogics31-Aug-09 20:47
professionalmylogics31-Aug-09 20:47 
Actually i want to insert data in Product.db table
it has columns named:
PID: which is auto number
ProductID:Which is Primary key
and others columnss are:ProductName,ProductDescription,ProductPrice,VendorID;
i want the entries in ProductID table like when PID value is 1
ProductID value becomes PID1.in have written code for this on button click.but the Promblem occurs that when somebody deletes the rows of
the table the new PID Value doesnt start from 1.it start from last deleted value of PID.Now i want that ProductID value gets update according to the PID value.the code at button click is:
string str1 = "Select MAX(PID) From Product";
       OleDbCommand cmd = new OleDbCommand(str1, conn);
       conn.Open();
       string max= cmd.ExecuteScalar().ToString();
       if (max == "")
       {
           max = "PID" + 1;
       }
       else
       {
       int i= Convert.ToInt32(max) + 1;
       string s1=Convert.ToString(i);
       max = "PID" + s1;
       }
       conn.Close();
       string str = "Insert Into Product(ProductID,ProductName,ProductDescription,ProductPrice)Values('"+max+"','" + txtprdtname.Text + "','" + txtprdtdescrp.Text + "','" + txtprdtprice.Text + "')";
       cmd = new OleDbCommand(str, conn);
       conn.Open();
       cmd.ExecuteNonQuery();
       conn.Close();
       str = "Select * From Product";
       cmd = new OleDbCommand(str, conn);
       OleDbDataReader dr1 = null;
       conn.Open();
       dr1 = cmd.ExecuteReader();
       DropDownList2.DataSource = dr1;
       DropDownList2.DataTextField = "ProductID";
       DropDownList2.DataValueField = "ProductID";
       DropDownList2.DataBind();
       conn.Close();


so m trying to update the ProductID value AS i have default inserted
PID1 when the first row is inserted in Product table.
GeneralRe: update database Pin
Coding C#31-Aug-09 20:57
Coding C#31-Aug-09 20:57 
GeneralRe: update database Pin
mylogics31-Aug-09 21:03
professionalmylogics31-Aug-09 21:03 
GeneralRe: update database Pin
Christian Graus31-Aug-09 21:07
protectorChristian Graus31-Aug-09 21:07 
GeneralRe: update database Pin
Christian Graus31-Aug-09 21:03
protectorChristian Graus31-Aug-09 21:03 
JokeRe: update database Pin
Greg Chelstowski31-Aug-09 21:33
Greg Chelstowski31-Aug-09 21:33 
GeneralRe: update database Pin
Christian Graus1-Sep-09 12:16
protectorChristian Graus1-Sep-09 12:16 
QuestionOnClientClick Event Pin
KhandelwalA31-Aug-09 20:19
KhandelwalA31-Aug-09 20:19 
AnswerRe: OnClientClick Event Pin
Christian Graus31-Aug-09 20:35
protectorChristian Graus31-Aug-09 20:35 
AnswerRe: OnClientClick Event Pin
Vimalsoft(Pty) Ltd31-Aug-09 21:24
professionalVimalsoft(Pty) Ltd31-Aug-09 21:24 

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.