473,387 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Solution Required

nil
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

Nov 17 '06 #1
2 1107
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
Nov 17 '06 #2
nil


On Nov 17, 7:22 pm, cha...@totalise.co.uk 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

Nov 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Patchwork | last post by:
Hi Everyone, I have a design related question (in C++) that I am hoping someone can help me with. It is related to my previous post but since it was pointed out that I was more or less asking...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
5
by: kai | last post by:
Hi, I use XP Pro and VS2005. I find when I create a new Website, I only see the Project node not Solution. After I add sedcond project under the solution tree, then I see the solution node. How...
0
by: Shawn Cutter | last post by:
I am beginning work on a somewhat complex project and I need to decide what route to take before beginning the project. The main issue with this project is that it needs to be modular and support...
2
by: mkd1919 | last post by:
I'm developing a web service that will eventually be sent to other like organizations to communicate for a particular application. After a few weeks, I decided it would be better to split of the...
2
by: John Kotuby | last post by:
Hello all, Note: This is the full version of a Post that I inadvertently sent before it was complete. About a year ago I wrote a VB.NET 2003 solution that consists of a number of assemblies...
3
by: Raqueeb Hassan | last post by:
Hello, Given the idea of having voter ID card for all the citizens of Bangladesh, I was thinking of assessing few things before it actually starts. The election commission, the government agency...
12
by: Gustaf | last post by:
I've been working on a membership form for a while, and find it very tedious to get an acceptable level of form validation. A web search for solutions revealed some home-brewed solutions, such as...
158
by: jacob navia | last post by:
1: It is not possible to check EVERY malloc result within complex software. 2: The reasonable solution (use a garbage collector) is not possible for whatever reasons. 3: A solution like the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.