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

Discussion in 'ASP .Net Web Controls' started by frankkirchner, Oct 9, 2006.

  1. 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?

    --
    Frank Kirchner
    Programmer Analyst
    Regional Development
    SYSCO Corp.
     
    frankkirchner, Oct 9, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    591
    Alphonse Giambrone
    Jun 28, 2003
  2. Y.S.
    Replies:
    3
    Views:
    1,025
    strajan
    Sep 17, 2003
  3. LT
    Replies:
    7
    Views:
    2,101
    Phlip
    Jul 25, 2004
  4. John

    Non-code behind to code behind

    John, Feb 19, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    490
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 19, 2007
  5. Markus Mohr
    Replies:
    7
    Views:
    251
    Thomas 'PointedEars' Lahn
    Nov 28, 2003
Loading...

Share This Page