Generated Code Confused

G

G. Dean Blake

I have a project with many DataAdapters and Datasets generated via the
Wizard. DAs and been deleted and more DAs have been added. The Generated
code has become somewhat of a mess.

Now when I try to add a new SQLDataAdapter I get an error box saying that
there is already a SQLSelectCommand12. I notice that DAs have different
numbers for their Select, Insert, Delete commands too.

What is the best way in which to fix this mess?
Thanks,
G
 
J

John Saunders

G. Dean Blake said:
I have a project with many DataAdapters and Datasets generated via the
Wizard. DAs and been deleted and more DAs have been added. The Generated
code has become somewhat of a mess.

Now when I try to add a new SQLDataAdapter I get an error box saying that
there is already a SQLSelectCommand12. I notice that DAs have different
numbers for their Select, Insert, Delete commands too.

What is the best way in which to fix this mess?

Give them all real names. I use things like daCustomers, dvCustomers and
dsNorthwind, conNorthwind, cmdselCustomers, cmddelCustomers.
 
G

G. Dean Blake

Sorry, I wasn't clear enough...

I give my dataAdapters meaningful names along with my datasets. VS.NET then
generates command objects and names them things like SqlSelectCommand1,
SqlInsertCommand1, SqlUpdatecommand14, etc. That's what's getting
clobbered.
G
 
J

John Saunders

G. Dean Blake said:
Sorry, I wasn't clear enough...

I give my dataAdapters meaningful names along with my datasets. VS.NET then
generates command objects and names them things like SqlSelectCommand1,
SqlInsertCommand1, SqlUpdatecommand14, etc. That's what's getting
clobbered.

My answer is the same. Give them real names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top