Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 8th, 2003, 04:04 PM
Registered User
Join Date: Dec 2003
Location: Vancouver, BC, Canada.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dreamweaver MX2004 Datagrid update error

using DWMX2004 I have built a simple datagrid page, that connects to a sql2000 db.

The datagrid displays all of the information correctly, and will delete records as expected.
When I go to edit a record, all works as expected, until I go to update a record. Then I get the following error.

System.Data.SqlClient.SqlException: The variable name '@ProductID' has already been declared.

If anyone needs to see the code, I can post it for review to see if I am missing something, or have incorrectly added a field.

When I try comparing my code to the datagrid example from Macromedia, the example will not update a record either? Is there a bug in the dreamweaver controls for db updates within the datagrid?


Reply With Quote
  #2 (permalink)  
Old December 10th, 2003, 12:47 PM
Friend of Wrox
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts

Please post your Page_Load code or try this:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not IsPostBack Then
            objConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " & _
                            "data source=C:\Inetpub\wwwroot\asmain\dates.mdb")

            objConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " & _
                            "data source=C:\Inetpub\wwwroot\asmain\dates.mdb")

        End If
    End Sub

showdatagrid() being the sub that displays data to the data grid control.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver error beetle_jaipur Dreamweaver (all versions) 0 May 3rd, 2006 07:06 AM
Datagrid.update() and DataAdapter.Update aarunlal ASP.NET 2.0 Professional 2 February 23rd, 2006 11:41 PM
Datagrid update error eresina ADO.NET 3 October 22nd, 2004 07:15 AM
Dreamweaver MX 2004 7.0.1 update scott_fegette Dreamweaver (all versions) 0 March 12th, 2004 05:01 PM
Date trouble using Dreamweaver Update Dirosky Dreamweaver (all versions) 2 January 8th, 2004 09:06 AM

All times are GMT -4. The time now is 02:35 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.