Force SQL command test to exist in Code-behind for a sqldataadapte

F

frankkirchner

I posted this in vs2005 general - no one asnwered it there. Here it is again.

If I drop a SQLDataAdapter onto my component designer and configure it - it
saves the select string in the resource manager instead of in the source code
of initialize function (private void InitializeComponent())
example this.sqlSelectCommand1.CommandText =
resources.GetString("sqlSelectCommand1.CommandText");.

But when i run it i get an exception;
System.Resources.MissingManifestResourceException was unhandled by user code
Message="Could not find any resources appropriate for the specified
culture or the neutral culture. Make sure \"_Default.resources\" was
correctly embedded or linked into assembly \"App_Web_yymxgwrs\" at compile
time, or that all the satellite assemblies required are loadable and fully
signed."
Source="mscorlib"
StackTrace:
at
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
at
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
...............
if i code the select statement it works fine, but then any changes to the
designer puts the original failing code back in there.
is there a way to force the IDE to write this code into the source instead
of retrieving it from the resource manage?
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top