This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137751 - DB prefix isn't changed after changing DB type
Summary: DB prefix isn't changed after changing DB type
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Rob Englander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-19 17:27 UTC by Roman Mostyka
Modified: 2008-08-20 05:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-06-19 17:27:08 UTC
1. Rightclick "Databases" node and choose "New Database Connection...".
2. Choose MySQL and set all necessary parameters.
3. Click "OK". "Advanced" tab get focus.
4. Click "Basic Settings" tab and change DB type.

Result: "JDBC URL" still contains jdbc:mysql:// with the rest of parameters. It can mislead customer.
Comment 1 David Vancouvering 2008-06-19 19:44:01 UTC
Dumb schema logic, we really should fix this to be a wizard.
Comment 2 Rob Englander 2008-08-18 17:23:35 UTC
I can rewrite as a wizard, or just address the reported issue if doing the wizard is not considered important right now.
Comment 3 Rob Englander 2008-08-18 22:39:00 UTC
This is actually more than misleading.  I can easily create a connection with a name that indicates the wrong database
driver.  And I can just as easily create 2 connections at once; one with the wrong driver name such that the 2 are
actually connections to the same db instance, which I believe if the names were the same would not be allowed.

The actual bug here is the dialog state machine is not correct.  My suggestion is that we force the state machine for
now, so that once the connection is established, we do not allow the fields of the Basic settings to be modified.  The
user will still have the option of canceling if they want.  As David already pointed out, a Wizard would help us to
manage the state flow much better, but for now this approach will maintain the equivalence between the connection and
the form data.

Any objections?
Comment 4 Rob Englander 2008-08-18 23:19:37 UTC
I tend to have these conversations with myself ;)

I found a way to make this work for now such that the user can't mess it up.
So my earlier proposal is not necessary.
Comment 5 Rob Englander 2008-08-19 14:25:37 UTC
Fixed.  Ensured jdbc url stays in sync with form data when driver selection changes.
Comment 6 Roman Mostyka 2008-08-19 15:47:00 UTC
Verified with build 080819.
Comment 7 Quality Engineering 2008-08-20 05:34:01 UTC
Integrated into 'main-golden', available in build *200808200201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/5f451419111c
User: Rob Englander <mindstream@netbeans.org>
Log: #137751 Fixed updating of jdbc URL in new connection dialog so that it stays in sync with the form data.