Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Solution Required

Reply
Thread Tools

Solution Required

 
 
nil
Guest
Posts: n/a
 
      11-17-2006
I hope someone from u will surely help me.I am new to vb.net and
developing
one web application in vb.net2003.I hope i will have the good response
and advice from all of the members of this group...

problem is like this

I Want to store data temporarily so i created one data table in coding
and each time when user
do data entry one record will be stored in the data table and i m
showing all those entered
record in the data grid so user can modify the records later on if he
wants....

Here i m showing u the coding that i did
============================
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Call data()
txtdate.Text = System.DateTime.Now.Today
End Sub

Private Sub btsave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btsave.Click
'Dim str As String = "INSERT INTO BK_ORDER(ID, BOOK_NAME,
AUTHOR, PUBLICATION, EDITION, QTY, OVENDOR, ODATE, DURATION)
VALUES ('" & txtid.Text & "','" & txtbkname.Text & "','" &
txtauthor.Text & "','" & txtpbl.Text & "','" & txtedition.Text & "','"
& ddlqty.SelectedItem.Value & "','" & txtvendor.Text & "',sysdate , '"
& ddldur.SelectedItem.Value & "')"


Dim dt As New DataTable("Book order")
Dim dr As DataRow = dt.NewRow()

dt.Columns.Add(New DataColumn("ID", GetType(Int32)))
dt.Columns(0).AutoIncrement = True
dt.Columns(0).ReadOnly = True
dt.Columns.Add(New DataColumn("Book Name", GetType(String)))
dt.Columns.Add(New DataColumn("Author", GetType(String)))
dt.Columns.Add(New DataColumn("Publication", GetType(String)))
dt.Columns.Add(New DataColumn("Edition", GetType(Int32)))
dt.Columns.Add(New DataColumn("Qty", GetType(Int32)))
dt.Columns.Add(New DataColumn("Duration", GetType(Int32)))
dt.Columns.Add(New DataColumn("Venodor", GetType(String)))
dr("ID") = txtid.Text
dr("Book Name") = txtbkname.Text
dr("Author") = txtbkname.Text
dr("Publication") = txtbkname.Text
dr("Edition") = txtbkname.Text
dr("Qty") = ddlqty.SelectedItem.Value
dr("Duration") = ddldur.SelectedItem.Value
dr("Vendor") = txtvendor.Text
dt.Rows.Add(dr)
DataGrid1.DataSource = dt
DataGrid1.DataBind()
End Sub
Private Sub btclose_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btclose.Click
Response.Redirect("frmmain.aspx")
End Sub
Private Sub clear()
Call data()
txtbkname.Text = ""
txtauthor.Text = ""
txtpbl.Text = ""
txtedition.Text = ""
txtvendor.Text = ""

Call clear()
End Sub

Private Sub data()
'Dim ds As New DataSet()
'Dim dt As New DataTable("Book order")
'Dim columnid As New DataColumn("Id",
System.Type.GetType("system.int32", False, True))
'Dim columnname As New DataColumn("Book Name",
System.Type.GetType("system.string", False, True))
'Dim columnauthor As New DataColumn("Author",
System.Type.GetType("system.string", False, True))
'Dim columnpbl As New DataColumn("Publication",
System.Type.GetType("system.string", False, True))
'Dim columned As New DataColumn("Edition",
System.Type.GetType("system.int32", False, True))
'Dim columnqty As New DataColumn("Qty",
System.Type.GetType("system.int32", False, True))
'Dim columnvendor As New DataColumn("Vendor",
System.Type.GetType("system.string", False, True))
'Dim columndate As New DataColumn("Date",
System.Type.GetType("system.datetime", False, True))
'Dim columnduration As New DataColumn("Duration",
System.Type.GetType("system.int32", False, True))
'Dim str As String = "select * from bk_order"
''ds = dbconn(str)
'' dt.BeginLoadData()
' txtid.Text = ds.Tables(0).Rows.Count + 1
'DataGrid1.DataSource = ds
'DataGrid1.DataBind()
End Sub

and please note that when user enter record it is stored in the
datatable and when enter
other record then the previous will be overwrite by the second one.I
want to show all the
records in the grid entered by the user..i also checked declaring the
datatable at the top of
the class as global but it didn't work so please tell me what to do?
i am not saving all the data in the database at a time...but all the
records come
in to datatable and then user do modification and then i want to store
it in the database
and i am using oracle..hope someone from you'll help me in this...
and also tell me what is the session and use of it?should i use session
in this?if yes then
how tell me the coding for that....or suggest me any nice and good book
that covers
my problem..thanks

 
Reply With Quote
 
 
 
 
chandy@totalise.co.uk
Guest
Posts: n/a
 
      11-17-2006
Hi nil,

I suggest this:
http://tinyurl.com/y6evd7

Chandy

nil wrote:

> I hope someone from u will surely help me.I am new to vb.net and
> developing
> one web application in vb.net2003.I hope i will have the good response
> and advice from all of the members of this group...
>
> problem is like this
>
> I Want to store data temporarily so i created one data table in coding
> and each time when user
> do data entry one record will be stored in the data table and i m
> showing all those entered
> record in the data grid so user can modify the records later on if he
> wants....
>
> Here i m showing u the coding that i did
> ============================
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> Call data()
> txtdate.Text = System.DateTime.Now.Today
> End Sub
>
> Private Sub btsave_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btsave.Click
> 'Dim str As String = "INSERT INTO BK_ORDER(ID, BOOK_NAME,
> AUTHOR, PUBLICATION, EDITION, QTY, OVENDOR, ODATE, DURATION)
> VALUES ('" & txtid.Text & "','" & txtbkname.Text & "','" &
> txtauthor.Text & "','" & txtpbl.Text & "','" & txtedition.Text & "','"
> & ddlqty.SelectedItem.Value & "','" & txtvendor.Text & "',sysdate , '"
> & ddldur.SelectedItem.Value & "')"
>
>
> Dim dt As New DataTable("Book order")
> Dim dr As DataRow = dt.NewRow()
>
> dt.Columns.Add(New DataColumn("ID", GetType(Int32)))
> dt.Columns(0).AutoIncrement = True
> dt.Columns(0).ReadOnly = True
> dt.Columns.Add(New DataColumn("Book Name", GetType(String)))
> dt.Columns.Add(New DataColumn("Author", GetType(String)))
> dt.Columns.Add(New DataColumn("Publication", GetType(String)))
> dt.Columns.Add(New DataColumn("Edition", GetType(Int32)))
> dt.Columns.Add(New DataColumn("Qty", GetType(Int32)))
> dt.Columns.Add(New DataColumn("Duration", GetType(Int32)))
> dt.Columns.Add(New DataColumn("Venodor", GetType(String)))
> dr("ID") = txtid.Text
> dr("Book Name") = txtbkname.Text
> dr("Author") = txtbkname.Text
> dr("Publication") = txtbkname.Text
> dr("Edition") = txtbkname.Text
> dr("Qty") = ddlqty.SelectedItem.Value
> dr("Duration") = ddldur.SelectedItem.Value
> dr("Vendor") = txtvendor.Text
> dt.Rows.Add(dr)
> DataGrid1.DataSource = dt
> DataGrid1.DataBind()
> End Sub
> Private Sub btclose_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btclose.Click
> Response.Redirect("frmmain.aspx")
> End Sub
> Private Sub clear()
> Call data()
> txtbkname.Text = ""
> txtauthor.Text = ""
> txtpbl.Text = ""
> txtedition.Text = ""
> txtvendor.Text = ""
>
> Call clear()
> End Sub
>
> Private Sub data()
> 'Dim ds As New DataSet()
> 'Dim dt As New DataTable("Book order")
> 'Dim columnid As New DataColumn("Id",
> System.Type.GetType("system.int32", False, True))
> 'Dim columnname As New DataColumn("Book Name",
> System.Type.GetType("system.string", False, True))
> 'Dim columnauthor As New DataColumn("Author",
> System.Type.GetType("system.string", False, True))
> 'Dim columnpbl As New DataColumn("Publication",
> System.Type.GetType("system.string", False, True))
> 'Dim columned As New DataColumn("Edition",
> System.Type.GetType("system.int32", False, True))
> 'Dim columnqty As New DataColumn("Qty",
> System.Type.GetType("system.int32", False, True))
> 'Dim columnvendor As New DataColumn("Vendor",
> System.Type.GetType("system.string", False, True))
> 'Dim columndate As New DataColumn("Date",
> System.Type.GetType("system.datetime", False, True))
> 'Dim columnduration As New DataColumn("Duration",
> System.Type.GetType("system.int32", False, True))
> 'Dim str As String = "select * from bk_order"
> ''ds = dbconn(str)
> '' dt.BeginLoadData()
> ' txtid.Text = ds.Tables(0).Rows.Count + 1
> 'DataGrid1.DataSource = ds
> 'DataGrid1.DataBind()
> End Sub
>
> and please note that when user enter record it is stored in the
> datatable and when enter
> other record then the previous will be overwrite by the second one.I
> want to show all the
> records in the grid entered by the user..i also checked declaring the
> datatable at the top of
> the class as global but it didn't work so please tell me what to do?
> i am not saving all the data in the database at a time...but all the
> records come
> in to datatable and then user do modification and then i want to store
> it in the database
> and i am using oracle..hope someone from you'll help me in this...
> and also tell me what is the session and use of it?should i use session
> in this?if yes then
> how tell me the coding for that....or suggest me any nice and good book
> that covers
> my problem..thanks


 
Reply With Quote
 
 
 
 
nil
Guest
Posts: n/a
 
      11-19-2006


On Nov 17, 7:22 pm, (E-Mail Removed) wrote:
> Hi nil,
>
> I suggest this:http://tinyurl.com/y6evd7
>
> Chandy
>
>
>
> nil wrote:
> > I hope someone from u will surely help me.I am new to vb.net and
> > developing
> > one web application in vb.net2003.I hope i will have the good response
> > and advice from all of the members of this group...

>
> > problem is like this

>
> > I Want to store data temporarily so i created one data table in coding
> > and each time when user
> > do data entry one record will be stored in the data table and i m
> > showing all those entered
> > record in the data grid so user can modify the records later on if he
> > wants....

>
> > Here i m showing u the coding that i did
> > ============================
> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
> > 'Put user code to initialize the page here
> > Call data()
> > txtdate.Text = System.DateTime.Now.Today
> > End Sub

>
> > Private Sub btsave_Click(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles btsave.Click
> > 'Dim str As String = "INSERT INTO BK_ORDER(ID, BOOK_NAME,
> > AUTHOR, PUBLICATION, EDITION, QTY, OVENDOR, ODATE, DURATION)
> > VALUES ('" & txtid.Text & "','" & txtbkname.Text & "','" &
> > txtauthor.Text & "','" & txtpbl.Text & "','" & txtedition.Text & "','"
> > & ddlqty.SelectedItem.Value & "','" & txtvendor.Text & "',sysdate , '"
> > & ddldur.SelectedItem.Value & "')"

>
> > Dim dt As New DataTable("Book order")
> > Dim dr As DataRow = dt.NewRow()

>
> > dt.Columns.Add(New DataColumn("ID", GetType(Int32)))
> > dt.Columns(0).AutoIncrement = True
> > dt.Columns(0).ReadOnly = True
> > dt.Columns.Add(New DataColumn("Book Name", GetType(String)))
> > dt.Columns.Add(New DataColumn("Author", GetType(String)))
> > dt.Columns.Add(New DataColumn("Publication", GetType(String)))
> > dt.Columns.Add(New DataColumn("Edition", GetType(Int32)))
> > dt.Columns.Add(New DataColumn("Qty", GetType(Int32)))
> > dt.Columns.Add(New DataColumn("Duration", GetType(Int32)))
> > dt.Columns.Add(New DataColumn("Venodor", GetType(String)))
> > dr("ID") = txtid.Text
> > dr("Book Name") = txtbkname.Text
> > dr("Author") = txtbkname.Text
> > dr("Publication") = txtbkname.Text
> > dr("Edition") = txtbkname.Text
> > dr("Qty") = ddlqty.SelectedItem.Value
> > dr("Duration") = ddldur.SelectedItem.Value
> > dr("Vendor") = txtvendor.Text
> > dt.Rows.Add(dr)
> > DataGrid1.DataSource = dt
> > DataGrid1.DataBind()
> > End Sub
> > Private Sub btclose_Click(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles btclose.Click
> > Response.Redirect("frmmain.aspx")
> > End Sub
> > Private Sub clear()
> > Call data()
> > txtbkname.Text = ""
> > txtauthor.Text = ""
> > txtpbl.Text = ""
> > txtedition.Text = ""
> > txtvendor.Text = ""

>
> > Call clear()
> > End Sub

>
> > Private Sub data()
> > 'Dim ds As New DataSet()
> > 'Dim dt As New DataTable("Book order")
> > 'Dim columnid As New DataColumn("Id",
> > System.Type.GetType("system.int32", False, True))
> > 'Dim columnname As New DataColumn("Book Name",
> > System.Type.GetType("system.string", False, True))
> > 'Dim columnauthor As New DataColumn("Author",
> > System.Type.GetType("system.string", False, True))
> > 'Dim columnpbl As New DataColumn("Publication",
> > System.Type.GetType("system.string", False, True))
> > 'Dim columned As New DataColumn("Edition",
> > System.Type.GetType("system.int32", False, True))
> > 'Dim columnqty As New DataColumn("Qty",
> > System.Type.GetType("system.int32", False, True))
> > 'Dim columnvendor As New DataColumn("Vendor",
> > System.Type.GetType("system.string", False, True))
> > 'Dim columndate As New DataColumn("Date",
> > System.Type.GetType("system.datetime", False, True))
> > 'Dim columnduration As New DataColumn("Duration",
> > System.Type.GetType("system.int32", False, True))
> > 'Dim str As String = "select * from bk_order"
> > ''ds = dbconn(str)
> > '' dt.BeginLoadData()
> > ' txtid.Text = ds.Tables(0).Rows.Count + 1
> > 'DataGrid1.DataSource = ds
> > 'DataGrid1.DataBind()
> > End Sub

>
> > and please note that when user enter record it is stored in the
> > datatable and when enter
> > other record then the previous will be overwrite by the second one.I
> > want to show all the
> > records in the grid entered by the user..i also checked declaring the
> > datatable at the top of
> > the class as global but it didn't work so please tell me what to do?
> > i am not saving all the data in the database at a time...but all the
> > records come
> > in to datatable and then user do modification and then i want to store
> > it in the database
> > and i am using oracle..hope someone from you'll help me in this...
> > and also tell me what is the session and use of it?should i use session
> > in this?if yes then
> > how tell me the coding for that....or suggest me any nice and good book
> > that covers
> > my problem..thanks- Hide quoted text -- Show quoted text -


thanks a lot for your help

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logger solution Required Proton Projects - Moin Java 1 03-02-2007 06:33 PM
Solution Required for Printing SQL Server 2005 Local Reports aleemkhan@gmail.com ASP .Net 0 12-25-2006 07:29 PM
Create a VD with required properties on a required Web Server (Windows Advanced Server 2000 has 3 Web Servers) Just D. ASP .Net 0 03-10-2006 06:02 AM
Windows XP solution required Barry Computer Support 3 10-31-2004 11:55 PM
ASP .NET and ASP style confusion. Immediate solution required =?Utf-8?B?TW9oaXQgR3VwdGE=?= ASP .Net 1 10-18-2004 01:52 PM



Advertisments