ASP.Net VB Dataview Insert, Update, and Delete example

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
bpryer
Posts: 4
Joined: Fri 07 Jul 2006 19:03

ASP.Net VB Dataview Insert, Update, and Delete example

Post by bpryer » Fri 07 Jul 2006 19:31

I am extremely new to ASP.net so sorry for sound stupid. I am in desperate need of an ASP.net using VB example of a dataview that will update, delete, and insert. I have searched numerous places on the web that only provided code that only further confused me. Can anyone provide an example of a dataview that updates, inserts and deletes?

Any help is much appreciated.

thank you,

Brenton

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 10 Jul 2006 11:34

Place GridView component onto a form, choose "Choose Data Source" -> and configure it.

bpryer
Posts: 4
Joined: Fri 07 Jul 2006 19:03

ASP.Net VB Dataview Insert, Update, and Delete example

Post by bpryer » Mon 10 Jul 2006 22:40

I've got that far, but when I try and update, the grid or database is not effected. Should I do this programatically (if so, an example would be nice) or should I use the standard code generated by VS 2005?

Brent

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 11 Jul 2006 06:15

Did you tick appropriate checkbox for Update command generation while configuring SqlDataSource component?

bpryer
Posts: 4
Joined: Fri 07 Jul 2006 19:03

ASP.Net VB Dataview Insert, Update, and Delete example

Post by bpryer » Thu 13 Jul 2006 16:00

the SQLDataSource wouldn't let me check the Generate update commands.

I am not sure why I cant do this. Everything i am reading seems like this is an easy thing to do.

thank you,

Brent

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 14 Jul 2006 06:17

the SQLDataSource wouldn't let me check the Generate update commands.
Does this mean that the checkbox is disabled?

bpryer
Posts: 4
Joined: Fri 07 Jul 2006 19:03

Datagrid Update

Post by bpryer » Fri 14 Jul 2006 21:54

correct the checkbox is disabled.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 17 Jul 2006 06:19

We are investigating this problem. You will be notified on results as soon as possible. For the present you can configure SqlDataSource programmatically:

Code: Select all

        
            
                
            
        
        "
            DeleteCommand="DELETE FROM dept WHERE DEPTNO = ?" InsertCommand="INSERT INTO dept (DEPTNO, DNAME, LOC) VALUES (?, ?, ?)"
            ProviderName="" SelectCommand="SELECT * FROM dept"
            UpdateCommand="UPDATE dept SET DNAME = ?, LOC = ? WHERE DEPTNO = ?">
            
                
            
            
                
                
                
            
            
                
                
                
            
        

Post Reply