Click here to Skip to main content
15,910,981 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Why Event is not firing for an ASP.NET Button?? Pin
Nagraj Naik22-Jun-06 20:29
Nagraj Naik22-Jun-06 20:29 
QuestionGridView.Columns Pin
eggsovereasy22-Jun-06 5:57
eggsovereasy22-Jun-06 5:57 
AnswerRe: GridView.Columns Pin
Mike Ellison22-Jun-06 7:30
Mike Ellison22-Jun-06 7:30 
GeneralRe: GridView.Columns Pin
eggsovereasy22-Jun-06 7:46
eggsovereasy22-Jun-06 7:46 
GeneralRe: GridView.Columns Pin
Mike Ellison22-Jun-06 8:42
Mike Ellison22-Jun-06 8:42 
GeneralBrilliant! Pin
eggsovereasy22-Jun-06 9:30
eggsovereasy22-Jun-06 9:30 
GeneralRe: Brilliant! Pin
Mike Ellison22-Jun-06 10:20
Mike Ellison22-Jun-06 10:20 
QuestionAdding DataRow in DataTable Pin
peshawarcoder22-Jun-06 5:08
peshawarcoder22-Jun-06 5:08 
How can i reflect changes in database through DataSet?
I have Items table with three columns[Item,UnitPrice,Quantity] in my database(mydb). I get that data in a DataTable through SqlDataAdapter. I create a DataRow), populate its fields, write it to the table, and call on AcceptChanges() method. But actually this row is not added to the table.
I wana reflect this change in table. The code is as under:

Sub Page_Load
Dim connString As String
connString="server=pc1;database=mydb;trusted_connection=true"
Dim conn As New SqlConnection(connString)
Dim cmd As New SqlCommand("Select * From Items",conn)
Dim adapter As New SqlDataAdapter(cmd)
Dim ds As New DataSet()
conn.open()
adapter.fill(ds,"Items")
dim dr As DataRow=ds.Tables("Items").NewRow()
dr(0)="Item3"
dr(1)=44
dr(2)=44.4
ds.Tables("Items").Rows.Add(dr)
ds.Tables("Items").AcceptChanges()
adapter.Update(ds.Tables("Items"))
conn.Close()
MyDataGrid.DataSource=ds.Tables("Items")
MyDataGrid.DataBind()
End Sub

Thanks
AnswerRe: Adding DataRow in DataTable Pin
Paddy Boyd22-Jun-06 5:52
Paddy Boyd22-Jun-06 5:52 
GeneralRe: Adding DataRow in DataTable Pin
peshawarcoder22-Jun-06 5:57
peshawarcoder22-Jun-06 5:57 
QuestionObjectDatasource Deletemethod w custom Business Object [modified] Pin
patt22-Jun-06 4:37
patt22-Jun-06 4:37 
AnswerRe: ObjectDatasource Deletemethod w custom Business Object Pin
minhpc_bk22-Jun-06 5:30
minhpc_bk22-Jun-06 5:30 
GeneralRe: ObjectDatasource Deletemethod w custom Business Object Pin
patt22-Jun-06 5:48
patt22-Jun-06 5:48 
GeneralRe: ObjectDatasource Deletemethod w custom Business Object Pin
minhpc_bk22-Jun-06 15:01
minhpc_bk22-Jun-06 15:01 
QuestionFree AJAX enabled Controls [modified] Pin
wEb GuRu...22-Jun-06 4:33
wEb GuRu...22-Jun-06 4:33 
AnswerRe: Free AJAX enabled Controls Pin
RichardGrimmer22-Jun-06 4:49
RichardGrimmer22-Jun-06 4:49 
QuestionHow to handle a click of a hyperlink Pin
widget122-Jun-06 4:16
widget122-Jun-06 4:16 
AnswerRe: How to handle a click of a hyperlink Pin
RichardGrimmer22-Jun-06 4:52
RichardGrimmer22-Jun-06 4:52 
GeneralRe: How to handle a click of a hyperlink Pin
widget122-Jun-06 5:57
widget122-Jun-06 5:57 
AnswerRe: How to handle a click of a hyperlink Pin
Dustin Metzgar22-Jun-06 4:58
Dustin Metzgar22-Jun-06 4:58 
GeneralRe: How to handle a click of a hyperlink Pin
widget122-Jun-06 5:08
widget122-Jun-06 5:08 
GeneralRe: How to handle a click of a hyperlink Pin
Dustin Metzgar22-Jun-06 5:21
Dustin Metzgar22-Jun-06 5:21 
AnswerRe: How to handle a click of a hyperlink Pin
patt22-Jun-06 5:08
patt22-Jun-06 5:08 
Questionasp.net 2.0 GridView Pin
fmardani22-Jun-06 4:11
fmardani22-Jun-06 4:11 
AnswerRe: asp.net 2.0 GridView Pin
minhpc_bk22-Jun-06 5:31
minhpc_bk22-Jun-06 5:31 

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.