Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to use international live gold price in my project. Pin
syedabidali28-Aug-09 19:55
syedabidali28-Aug-09 19:55 
AnswerRe: how to use international live gold price in my project. Pin
Arindam Sinha28-Aug-09 20:39
Arindam Sinha28-Aug-09 20:39 
AnswerRe: how to use international live gold price in my project. Pin
venkat.ven26-Jun-11 19:48
venkat.ven26-Jun-11 19:48 
Question[Message Deleted] Pin
Simi SA28-Aug-09 19:14
Simi SA28-Aug-09 19:14 
AnswerRe: how to upload a picture Pin
Parwej Ahamad28-Aug-09 19:21
professionalParwej Ahamad28-Aug-09 19:21 
AnswerRe: how to upload a picture Pin
padmanabhan N28-Aug-09 19:25
padmanabhan N28-Aug-09 19:25 
AnswerRe: how to upload a picture Pin
Abhijit Jana28-Aug-09 23:45
professionalAbhijit Jana28-Aug-09 23:45 
QuestionPlease help with inserting GridView Values in oracle table Pin
Hammad Mansoor28-Aug-09 19:07
Hammad Mansoor28-Aug-09 19:07 
Hi all

I have a grid view which is used to delete the data in it. I want the data to be stored in another table before it is deleted from the actual table. The database is in Oracle. I am using the following code.


Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GridView1.RowDeleting

Dim oradb As String = "Data Source=(DESCRIPTION=" _
+ "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Mahasilbkp.ltuisb.net)(PORT=1521)))" _
+ "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=db21a)));" _
+ "User Id=<userid>;Password=<password>;pooling=false;enlist=false;"

Dim conn1 As New OracleConnection(oradb)
conn1.Open()

Dim cmd1 As New OracleCommand

cmd1.Connection = conn1

GridView1.DataBind()

cmd1.CommandText = "insert into uu.record_backup(ntn, name, status, enf, aud, sector, delete_user) select ntn, name, status, enf, aud, sector" + ",'" + Label5.Text + "'" + " " + "from uu.total_cases where trim(ntn)=" + "'" + GridView1.SelectedValue + "'"

Dim dr1 As OracleDataReader = cmd1.ExecuteReader()
dr1.Read()

dr1.Dispose()
dr1.Close()
cmd1.Dispose()
conn1.Dispose()
conn1.Close()

End Sub

The insert command execute perfectly if I remove the GridView1.SelectedValue. But it does not give the desired result as I want the value displayed in the data grid to be inserted only, before it is deleted. What happens in the above code is that data is deleted from the actual table, but nothing is inserted in the backup table described in the code above. I understand I need to write something else instead of GridView1.SelectedValue, but I can't think of anything else. Please help me with this.

Thanks.
AnswerRe: Please help with inserting GridView Values in oracle table Pin
janani1328-Aug-09 19:41
janani1328-Aug-09 19:41 
GeneralRe: Please help with inserting GridView Values in oracle table Pin
Hammad Mansoor28-Aug-09 20:05
Hammad Mansoor28-Aug-09 20:05 
GeneralRe: Please help with inserting GridView Values in oracle table Pin
Sneha Bisht28-Aug-09 20:45
Sneha Bisht28-Aug-09 20:45 
GeneralRe: Please help with inserting GridView Values in oracle table Pin
Hammad Mansoor28-Aug-09 22:13
Hammad Mansoor28-Aug-09 22:13 
AnswerRe: Please help with inserting GridView Values in oracle table Pin
Hammad Mansoor1-Sep-09 19:08
Hammad Mansoor1-Sep-09 19:08 
Questionsaving multiple data enteries Pin
swtlibra28-Aug-09 17:51
swtlibra28-Aug-09 17:51 
AnswerRe: saving multiple data enteries Pin
Parwej Ahamad28-Aug-09 19:25
professionalParwej Ahamad28-Aug-09 19:25 
QuestionHow to embedd webcam control in webpage ? Pin
Bhaumik DV28-Aug-09 5:35
Bhaumik DV28-Aug-09 5:35 
AnswerRe: How to embedd webcam control in webpage ? Pin
Manas Bhardwaj28-Aug-09 8:10
professionalManas Bhardwaj28-Aug-09 8:10 
GeneralRe: How to embedd webcam control in webpage ? Pin
Bhaumik DV28-Aug-09 23:36
Bhaumik DV28-Aug-09 23:36 
AnswerRe: How to embedd webcam control in webpage ? Pin
Blue_Boy28-Aug-09 9:40
Blue_Boy28-Aug-09 9:40 
QuestionImage loupe Pin
BoySetsFire28-Aug-09 4:41
BoySetsFire28-Aug-09 4:41 
AnswerRe: Image loupe Pin
Manas Bhardwaj28-Aug-09 5:18
professionalManas Bhardwaj28-Aug-09 5:18 
QuestionDynamically change color of xml sitemap titles Pin
compninja2528-Aug-09 3:59
compninja2528-Aug-09 3:59 
AnswerRe: Dynamically change color of xml sitemap titles Pin
compninja251-Sep-09 3:23
compninja251-Sep-09 3:23 
QuestionCustom validator Pin
diacoboss28-Aug-09 3:50
diacoboss28-Aug-09 3:50 
AnswerRe: Custom validator Pin
Manas Bhardwaj28-Aug-09 3:59
professionalManas Bhardwaj28-Aug-09 3:59 

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.