By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,563 Members | 1,307 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,563 IT Pros & Developers. It's quick & easy.

Dataset Headaches

P: n/a
Hi all,
First of all, I am not trying to be the guy who comes in here shouting his
mouth off at Microsoft. However, ever sinse I started using typed datasets
in VS2005 I have been fighting with a recurring issue.

I will have a project open and be working in it just fine, when all of a
sudden when I try to do something in my dataset (either add a new query,
modify and existing one, etc.) I get a big fat error box on my screen
telling me that it couldn't find the connection string. Nothing has been
changed (manually) in the project in regards to the connection strings,
either in the web.config or the application settings.

Probably about 70% of the time, I can just drag a new table in the dataset
from the data explorer and that recreates the "lost" connection and
everything is fine for now. However, the other 30% of the time, I will try
that and it may appear to work at a glance, but then suddenly my code has
about 80 errors in it because the class that should have been generated by
that dataset has a random error in it. In the latest case I get "Error 101
Custom tool error: Failed to generate code. Unable to convert input xml file
content to a DataSet. Requested value 'My' was not found. Requested value
'My' was not found."

OK, so now my only option other than trying to hunt down the elusive "My"
that it's looking for, is to pull up the latest backup and try to merge my
changes into that one back when the dataset was still working. After going
through all this effort to get back to where I already was, I just need to
look forward to it happening all over again sometime in the near future.

I can't believe that I'm the only one going through this and it seems like
by now, there really should be some sort of resolution. I really like what
you are able to do using typed datasets, and have been pushing them at my
company ever sinse I started using them, but somedays the aggravation they
cause makes me want to go back to just doing everything manually.

OK, so thanks for letting me vent. Again, I'm not trying to "blame" anyone
in particular, I'm just trying to get a resolution. Does anyone have any
suggestions?

Thanks,
Matt
Jul 3 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone
in particular, I'm just trying to get a resolution. Does anyone have any
suggestions?
You can use a strong typed Collection of Data Objects that persist
themselves to the database.

Jul 3 '07 #2

P: n/a
Mr. Arnold wrote:
>
>OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone
in particular, I'm just trying to get a resolution. Does anyone have
any suggestions?

You can use a strong typed Collection of Data Objects that persist
themselves to the database.
Thank you for your suggestion. That doesn't really solve the problem at
hand, because I can't really go back and re-do the projects I'm
currently working on, but I may consider that for the future.
Jul 3 '07 #3

P: n/a
Mr. Arnold wrote:
>
>OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone
in particular, I'm just trying to get a resolution. Does anyone have
any suggestions?

You can use a strong typed Collection of Data Objects that persist
themselves to the database.
Thank you for your suggestion. That doesn't really solve the problem at
hand, because I can't really go back and re-do the projects I'm
currently working on, but I may consider that for the future.
Jul 3 '07 #4

P: n/a

"Matt MacDonald" <ma******@hotmaill.comwrote in message
news:46**********@hotmaill.com...
Mr. Arnold wrote:
>>
>>OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone
in particular, I'm just trying to get a resolution. Does anyone have
any suggestions?

You can use a strong typed Collection of Data Objects that persist
themselves to the database.

Thank you for your suggestion. That doesn't really solve the problem at
hand, because I can't really go back and re-do the projects I'm
currently working on, but I may consider that for the future.
Visual Paradigm's NHibernate

Jul 3 '07 #5

P: n/a
Hi Matt,

Rather than creating a dataset and dragging tables on to it with the VS 2005
designer, go back to the old VS 2003 method (using VS 2005) of

- Create a new component
- Drag your data adapters onto it
- Create a new dataset from the adapters.

This way, your dataset is independent of the underlying connection. It
really doesn't need a connection anyway. Just the adapters do.

I've heard that Microsoft is dropping this whole table adapter crap in VS
2008.

Jim

"Matt MacDonald" <ma******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi all,
First of all, I am not trying to be the guy who comes in here shouting
his mouth off at Microsoft. However, ever sinse I started using typed
datasets in VS2005 I have been fighting with a recurring issue.

I will have a project open and be working in it just fine, when all of a
sudden when I try to do something in my dataset (either add a new query,
modify and existing one, etc.) I get a big fat error box on my screen
telling me that it couldn't find the connection string. Nothing has been
changed (manually) in the project in regards to the connection strings,
either in the web.config or the application settings.

Probably about 70% of the time, I can just drag a new table in the dataset
from the data explorer and that recreates the "lost" connection and
everything is fine for now. However, the other 30% of the time, I will
try that and it may appear to work at a glance, but then suddenly my code
has about 80 errors in it because the class that should have been
generated by that dataset has a random error in it. In the latest case I
get "Error 101 Custom tool error: Failed to generate code. Unable to
convert input xml file content to a DataSet. Requested value 'My' was not
found. Requested value 'My' was not found."

OK, so now my only option other than trying to hunt down the elusive "My"
that it's looking for, is to pull up the latest backup and try to merge my
changes into that one back when the dataset was still working. After
going through all this effort to get back to where I already was, I just
need to look forward to it happening all over again sometime in the near
future.

I can't believe that I'm the only one going through this and it seems like
by now, there really should be some sort of resolution. I really like
what you are able to do using typed datasets, and have been pushing them
at my company ever sinse I started using them, but somedays the
aggravation they cause makes me want to go back to just doing everything
manually.

OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone in particular, I'm just trying to get a resolution. Does anyone
have any suggestions?

Thanks,
Matt

Jul 3 '07 #6

P: n/a
Again, thanks for the suggestion, but I'm kind of past the point where I can
just start my whole data layer over again. I need to be able to fix what I
have.

Thanks,
Matt

"Jim Rand" <ji*****@ix.netcom.comwrote in message
news:uk**************@TK2MSFTNGP03.phx.gbl...
Hi Matt,

Rather than creating a dataset and dragging tables on to it with the VS
2005 designer, go back to the old VS 2003 method (using VS 2005) of

- Create a new component
- Drag your data adapters onto it
- Create a new dataset from the adapters.

This way, your dataset is independent of the underlying connection. It
really doesn't need a connection anyway. Just the adapters do.

I've heard that Microsoft is dropping this whole table adapter crap in VS
2008.

Jim

"Matt MacDonald" <ma******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>Hi all,
First of all, I am not trying to be the guy who comes in here shouting
his mouth off at Microsoft. However, ever sinse I started using typed
datasets in VS2005 I have been fighting with a recurring issue.

I will have a project open and be working in it just fine, when all of a
sudden when I try to do something in my dataset (either add a new query,
modify and existing one, etc.) I get a big fat error box on my screen
telling me that it couldn't find the connection string. Nothing has been
changed (manually) in the project in regards to the connection strings,
either in the web.config or the application settings.

Probably about 70% of the time, I can just drag a new table in the
dataset from the data explorer and that recreates the "lost" connection
and everything is fine for now. However, the other 30% of the time, I
will try that and it may appear to work at a glance, but then suddenly my
code has about 80 errors in it because the class that should have been
generated by that dataset has a random error in it. In the latest case I
get "Error 101 Custom tool error: Failed to generate code. Unable to
convert input xml file content to a DataSet. Requested value 'My' was not
found. Requested value 'My' was not found."

OK, so now my only option other than trying to hunt down the elusive "My"
that it's looking for, is to pull up the latest backup and try to merge
my changes into that one back when the dataset was still working. After
going through all this effort to get back to where I already was, I just
need to look forward to it happening all over again sometime in the near
future.

I can't believe that I'm the only one going through this and it seems
like by now, there really should be some sort of resolution. I really
like what you are able to do using typed datasets, and have been pushing
them at my company ever sinse I started using them, but somedays the
aggravation they cause makes me want to go back to just doing everything
manually.

OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone in particular, I'm just trying to get a resolution. Does anyone
have any suggestions?

Thanks,
Matt


Jul 5 '07 #7

P: n/a


I believe you've fallen into the "Rapid Development" trap.

The quick drag and drop stuff can eventually screw you.
As you're finding out.
The development is quick. Maintenance sucks. Do yourself a favor and
develop a true DAL from the beginning.
In the long run, it'll save you.

I'd suggest:
Create the dataset independant of any underlying table adapter.

See
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry
for my example.

"Matt MacDonald" <ma******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi all,
First of all, I am not trying to be the guy who comes in here shouting
his
mouth off at Microsoft. However, ever sinse I started using typed
datasets
in VS2005 I have been fighting with a recurring issue.

I will have a project open and be working in it just fine, when all of a
sudden when I try to do something in my dataset (either add a new query,
modify and existing one, etc.) I get a big fat error box on my screen
telling me that it couldn't find the connection string. Nothing has been
changed (manually) in the project in regards to the connection strings,
either in the web.config or the application settings.

Probably about 70% of the time, I can just drag a new table in the dataset
from the data explorer and that recreates the "lost" connection and
everything is fine for now. However, the other 30% of the time, I will
try
that and it may appear to work at a glance, but then suddenly my code has
about 80 errors in it because the class that should have been generated by
that dataset has a random error in it. In the latest case I get "Error
101
Custom tool error: Failed to generate code. Unable to convert input xml
file
content to a DataSet. Requested value 'My' was not found. Requested value
'My' was not found."

OK, so now my only option other than trying to hunt down the elusive "My"
that it's looking for, is to pull up the latest backup and try to merge my
changes into that one back when the dataset was still working. After
going
through all this effort to get back to where I already was, I just need to
look forward to it happening all over again sometime in the near future.

I can't believe that I'm the only one going through this and it seems like
by now, there really should be some sort of resolution. I really like
what
you are able to do using typed datasets, and have been pushing them at my
company ever sinse I started using them, but somedays the aggravation they
cause makes me want to go back to just doing everything manually.

OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone
in particular, I'm just trying to get a resolution. Does anyone have any
suggestions?

Thanks,
Matt


Jul 5 '07 #8

P: n/a
I had a similar issue before. My post is at http://tinyurl.com/2p49qo
In my case, the issue was caused by copying a datatable from one xsd to
another. Once the problem occurs, there seems to be no way of fixing it.

I got tired of fixing the auto generated code, so in the end I just created
a new dataset. I let the wizard to most of the initial work, then pasted any
new tables one field at a time.
Likewise, I just copied the data adapter SQL statements - I made sure not to
copy the data adapter.
Even if you use Sourcesafe, like I do, restoring prior versions of the xsd
will not fix the project.

I've stuck to this technique since, and I get a lot less issues.
Not what you want to hear, I'm sure! However, it doesn't take that long once
you start. Plus you get stick with your current approach, no need to rewrite
the rest of the project.

Also, I'd recommend starting a brand new project - the connection string
seems to be stored in several places. Add your existing forms to the new
project. May seem a bit of paranoia , but better than going to all that
trouble and then finding the project still has problems.

Like you, I like using typed datasets, but it is a very fragile technology.
Vayse

"Matt MacDonald" <ma******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi all,
First of all, I am not trying to be the guy who comes in here shouting
his mouth off at Microsoft. However, ever sinse I started using typed
datasets in VS2005 I have been fighting with a recurring issue.

I will have a project open and be working in it just fine, when all of a
sudden when I try to do something in my dataset (either add a new query,
modify and existing one, etc.) I get a big fat error box on my screen
telling me that it couldn't find the connection string. Nothing has been
changed (manually) in the project in regards to the connection strings,
either in the web.config or the application settings.

Probably about 70% of the time, I can just drag a new table in the dataset
from the data explorer and that recreates the "lost" connection and
everything is fine for now. However, the other 30% of the time, I will
try that and it may appear to work at a glance, but then suddenly my code
has about 80 errors in it because the class that should have been
generated by that dataset has a random error in it. In the latest case I
get "Error 101 Custom tool error: Failed to generate code. Unable to
convert input xml file content to a DataSet. Requested value 'My' was not
found. Requested value 'My' was not found."

OK, so now my only option other than trying to hunt down the elusive "My"
that it's looking for, is to pull up the latest backup and try to merge my
changes into that one back when the dataset was still working. After
going through all this effort to get back to where I already was, I just
need to look forward to it happening all over again sometime in the near
future.

I can't believe that I'm the only one going through this and it seems like
by now, there really should be some sort of resolution. I really like
what you are able to do using typed datasets, and have been pushing them
at my company ever sinse I started using them, but somedays the
aggravation they cause makes me want to go back to just doing everything
manually.

OK, so thanks for letting me vent. Again, I'm not trying to "blame"
anyone in particular, I'm just trying to get a resolution. Does anyone
have any suggestions?

Thanks,
Matt

Jul 9 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.