473,408 Members | 2,832 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,408 software developers and data experts.

how to add, delete, search and view data

slapshock
hi....can u help me with my problem???

i need the codes on how add, delete, search and view data from listview in vb.net...
hope you can help me...
i am new in .NET...and i dont know how to do it
Mar 7 '07 #1
1 1062
Aneri
11
If oracle is used as back-end then

In .NET datagrid is generally used to view data
btnadd is a Button control
oraconnection1 is name given to OracleConnection
pt is declared as datatable


for ADD
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
Dim str1 As String
str1 = "insert into tablename(emp_no)values('"&txt1.Text&"')"
Dim cmd2 As New OracleClient.OracleCommand(str1, oraconnection1)
If oraconnection1.State = ConnectionState.Closed Then
oraconnection1.Open()
cmd2.ExecuteNonQuery()
oraconnection1.Close()

similarly,for DELETE

replace str1 with

str1 = ""delete from tablename where condition"

for VIEW,

Dim str As String
str = "select columname from tablename"
Dim cmd As New OracleClient.OracleCommand(str, oraconnection1)
Dim ad1 As New OracleClient.OracleDataAdapter(cmd)
pt.Clear()
ad1.Fill(pt)
oraconnection1.Close()
DataGrid1.DataSource = pt
DataGrid1.DataBind()
Mar 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: php newbie | last post by:
I am getting error messages when I try to delete from a table using the values in the table itself. The intent is to delete all rows from TableA where col_2 matches any of the col_1 values. ...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
2
by: Zarrin | last post by:
Hello, I read several articles of newsgroup about the bulk delete, and I found one way is to: -create a temporary table with all constraints of original table -insert rows to be retained into...
1
by: namewitheldbyrequest | last post by:
Hi, I need a script that I can run from ASP .Net that will delete all views that start with "Search". My site creates them on the fly and they tend to accumulate as more users visit the site. Is...
2
slapshock
by: slapshock | last post by:
hi!!!! i am new in vb.net... i want to know how to add, delete, search and view data using vb.net.... please help me on how to do it... hope you can help me ...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
7
by: ITAutobot25 | last post by:
My delete button is not working in my GUI and my due date is today before midnight. Can anyone show me how to correct this error? My assignment statement is below as well as 5 classes. InventoryGUI...
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.