|
-
Feb 8th, 2010, 08:05 AM
#1
Thread Starter
Lively Member
vb.net and gridview

can anyone help me how to add data if i click on Add button(user input)
and view data in gridview control
database already made using(sql server)
ty
-
Feb 8th, 2010, 08:14 AM
#2
Re: vb.net and gridview
What is the process behind the add button.
Are you adding directly to the database?
Is the grid populated with a dataset?
If populaated by a dataset are there Update, Insert and Delete statements defined on the data adapter?
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Feb 8th, 2010, 08:20 AM
#3
Thread Starter
Lively Member
Re: vb.net and gridview
ya i want it directly added to a database which takes user input from textbox's/combo box's
sql server:-database name(mygary)
-
Feb 8th, 2010, 08:22 AM
#4
Re: vb.net and gridview
Then once the query fires to insert the new data you will need to requery the database to refill the grid. If it is a data set you might be able to call refresh on it.
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Feb 8th, 2010, 08:36 AM
#5
Thread Starter
Lively Member
Re: vb.net and gridview
if the query fires once(insert into my gary values(......) i can't refill the gird so u can tell me how to do it with data set thanx
-
Feb 8th, 2010, 08:46 AM
#6
Re: vb.net and gridview
How do you fill the grid to start with?
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Feb 8th, 2010, 11:26 AM
#7
Thread Starter
Lively Member
Re: vb.net and gridview
bro i wanna use the dgv(datagrid view) only to view table enteres which are being made at sql server
only to display those values
if my table has 3 fields(id,name,password) containing value(gary,"mazzona","mazzone")
so my datagrid view should display these values
-
Feb 8th, 2010, 12:01 PM
#8
Thread Starter
Lively Member
Re: vb.net and gridview
if anyone here knows please reply
thanx
-
Feb 8th, 2010, 12:31 PM
#9
Re: vb.net and gridview
You write a select statement to run against the database. That is what I'm asking you how do you fill the grid to start with. According to your comments you don't at this point.
I suggest you Look at the FAQ at the top of the database fourm and look thought the ADO.Net tutorial.
Sometimes the Programmer
Sometimes the DBA
Mazz1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|