Generated Code Confused

  • Thread starter Thread starter G. Dean Blake
  • Start date Start date
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
 
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.
 
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
 
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.
 
Back
Top