Click here to Skip to main content
15,912,493 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Visual Studio 2008 Code Behind Interface Pin
Shahdat Hosain30-Mar-09 9:32
Shahdat Hosain30-Mar-09 9:32 
GeneralRe: Visual Studio 2008 Code Behind Interface Pin
janetb9930-Mar-09 9:35
janetb9930-Mar-09 9:35 
Questionrandomly fetching multiple records from database using asp.net Pin
smady1830-Mar-09 8:49
smady1830-Mar-09 8:49 
AnswerRe: randomly fetching multiple records from database using asp.net Pin
Colin Angus Mackay30-Mar-09 13:29
Colin Angus Mackay30-Mar-09 13:29 
QuestionHow capture the event and go to some validation for Wizard Control . Pin
Shahdat Hosain30-Mar-09 8:24
Shahdat Hosain30-Mar-09 8:24 
Questionsubmitting form with select - question Pin
shukow30-Mar-09 8:04
shukow30-Mar-09 8:04 
AnswerRe: submitting form with select - question Pin
Christian Graus30-Mar-09 15:25
protectorChristian Graus30-Mar-09 15:25 
QuestionUpdate in Gridview not working Pin
chilly44230-Mar-09 6:22
chilly44230-Mar-09 6:22 
I have a Web Form (VB) that a user can bring in data based on drop down boxes. If the data in the grid needs changed, then the user can click on the edit button for the row and make a change. The problem is, that the change is not reflected in the DB. I know that I am missing something somewhere.

This fills the Grid with the info that the user has selected:
Dim sql As String = "SELECT ID FROM TEST"
        Dim da As New OleDbDataAdapter(Sql, Con)
        Con.ConnectionString = connString
        Con.Open()
        da.Fill(ds, "Events")
        GridView1.DataSource = ds
        GridView1.DataBind()
        count = ds.Tables("Events").Rows.Count
        Con.Close()

This is the update that I am trying to use:
Dim sql As String
        sql = "UPDATE TEST SET ID = @ID WHERE (ID=@ID)"
        Using con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\WebSite1\App_Data\ODRT.mdb")
            Using cmd As New OleDbCommand(sql, con)
                cmd.CommandText = sql
                cmd.Parameters.AddWithValue("@ID", ID)
                con.Open()
                cmd.ExecuteNonQuery()
                con.Close()
                GridView1.EditIndex = -1
                DataBind()
            End Using
        End Using

Any Ideas???Mad | :mad:

Thanks,
Chilly
AnswerRe: Update in Gridview not working Pin
Yusuf30-Mar-09 6:42
Yusuf30-Mar-09 6:42 
GeneralRe: Update in Gridview not working Pin
chilly44230-Mar-09 6:45
chilly44230-Mar-09 6:45 
GeneralRe: Update in Gridview not working Pin
Yusuf30-Mar-09 7:31
Yusuf30-Mar-09 7:31 
GeneralRe: Update in Gridview not working Pin
chilly44230-Mar-09 7:37
chilly44230-Mar-09 7:37 
GeneralRe: Update in Gridview not working Pin
Yusuf30-Mar-09 9:36
Yusuf30-Mar-09 9:36 
GeneralRe: Update in Gridview not working Pin
chilly44230-Mar-09 9:42
chilly44230-Mar-09 9:42 
GeneralRe: Update in Gridview not working Pin
Yusuf30-Mar-09 9:45
Yusuf30-Mar-09 9:45 
GeneralRe: Update in Gridview not working Pin
chilly44230-Mar-09 9:46
chilly44230-Mar-09 9:46 
GeneralRe: Update in Gridview not working Pin
Yusuf30-Mar-09 9:56
Yusuf30-Mar-09 9:56 
GeneralRe: Update in Gridview not working Pin
chilly44230-Mar-09 11:33
chilly44230-Mar-09 11:33 
GeneralRe: Update in Gridview not working Pin
Yusuf30-Mar-09 11:52
Yusuf30-Mar-09 11:52 
GeneralRe: Update in Gridview not working Pin
chilly44230-Mar-09 12:02
chilly44230-Mar-09 12:02 
GeneralRe: Update in Gridview not working Pin
Yusuf30-Mar-09 12:35
Yusuf30-Mar-09 12:35 
GeneralRe: Update in Gridview not working Pin
chilly4429-Jun-09 8:40
chilly4429-Jun-09 8:40 
GeneralRe: Update in Gridview not working Pin
Yusuf9-Jun-09 10:05
Yusuf9-Jun-09 10:05 
GeneralRe: Update in Gridview not working Pin
chilly4429-Jun-09 10:12
chilly4429-Jun-09 10:12 
GeneralRe: Update in Gridview not working Pin
Yusuf9-Jun-09 13:06
Yusuf9-Jun-09 13:06 

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.