Going Nuts!

Discussion in 'ASP .Net' started by Shelly, Sep 19, 2007.

  1. Shelly

    Shelly Guest

    This ASPX/SqlServer stuff is driving me nuts.

    1 - In a previous post I said I had four tables and all were showing up in
    Object Explorer (MS SQL Server Management Studio Express), but when I went
    to do a query using the query text editor, only two of the tables showed up.
    Then, mysteriously, the problem went away. Now, it is back.

    2 - My insert into a table failed from the debug version in Web Developer,
    so I copied that SQL call and pasted it into SQL Server Management Program
    and ran the query. It worked. I then did a select * and only that entry
    showed up, not all the others. However, from my localhost website, when I
    do that select all the others show up but not the new one. This tells me
    that I must be looking at two different databases. The one from the site is
    the same as the one outlined in Object Explorer, but query window is
    connected to a different one. Try as I might, I have not been able to get
    the query window one to attach to the one in Object Explorer. In that app,
    the one that I want is listed as LAPTOP\SQLEXPRESS(Server 9,0.3042 -
    LAPTOP\Sheldon) and then the db name. The "other one" is SQL Server
    Compact Edition [MyComputer\...\thedbname]. In my app, the connection
    string in the config file is "Data Source=LAPTOP\SQLEXPRESS;Initial
    Catalog=thedbname;Integrated Security=True"
    providerName="System.Data..SqlClient"

    3 - I still can't figure out why my submit button will not fire an event if
    the last event was the one fired by that submit button.

    Please, someone, help me out here.

    Shelly
     
    Shelly, Sep 19, 2007
    #1
    1. Advertising

  2. Shelly

    Shelly Guest

    One more thing: The sql query window indicated that it is using
    LAPTOP\SQLEXPRESS -- the correct database, the one that I want. Doing a
    change_connection to that one still results in the same thing. If I do a
    select * from one of the tables that show up in Object Explorer (other than
    this one), it gives me "Invalid object name" -- because it doesn't have that
    table.

    Could this be a problem with my configuration in that I should only have one
    or the other? If that is the case, how do I get rid of the Compact Edition?
    Also, how do I find out where the actual database file is located?


    "Shelly" <> wrote in message
    news:...
    > This ASPX/SqlServer stuff is driving me nuts.
    >
    > 1 - In a previous post I said I had four tables and all were showing up in
    > Object Explorer (MS SQL Server Management Studio Express), but when I went
    > to do a query using the query text editor, only two of the tables showed
    > up. Then, mysteriously, the problem went away. Now, it is back.
    >
    > 2 - My insert into a table failed from the debug version in Web Developer,
    > so I copied that SQL call and pasted it into SQL Server Management Program
    > and ran the query. It worked. I then did a select * and only that entry
    > showed up, not all the others. However, from my localhost website, when I
    > do that select all the others show up but not the new one. This tells me
    > that I must be looking at two different databases. The one from the site
    > is the same as the one outlined in Object Explorer, but query window is
    > connected to a different one. Try as I might, I have not been able to get
    > the query window one to attach to the one in Object Explorer. In that
    > app, the one that I want is listed as LAPTOP\SQLEXPRESS(Server 9,0.3042 -
    > LAPTOP\Sheldon) and then the db name. The "other one" is SQL Server
    > Compact Edition [MyComputer\...\thedbname]. In my app, the connection
    > string in the config file is "Data Source=LAPTOP\SQLEXPRESS;Initial
    > Catalog=thedbname;Integrated Security=True"
    > providerName="System.Data..SqlClient"
    >
    > 3 - I still can't figure out why my submit button will not fire an event
    > if the last event was the one fired by that submit button.
    >
    > Please, someone, help me out here.
    >
    > Shelly
    >
     
    Shelly, Sep 19, 2007
    #2
    1. Advertising

  3. Well,
    it certainly does sound like you've got more than one of the same database
    going on.
    What I'd do is:

    1) Script out your "best" database using the Database Publishing Wizard to a
    SQL text file.

    2) Remove ALL database connections from management studio including the
    compact edtion.

    3) scour your machine(s) for *.MDF database files and get rid of them.

    4) Create a new database in the exact place where you want it - ONLY ONE.

    5) execute your saved SQL script against it to recreate your database.

    6) connect to the same single database from anywhere you work so you don't
    run into issues.

    good luck.
    Peter
    --
    Recursion: see Recursion
    site: http://www.eggheadcafe.com
    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "Shelly" wrote:

    > This ASPX/SqlServer stuff is driving me nuts.
    >
    > 1 - In a previous post I said I had four tables and all were showing up in
    > Object Explorer (MS SQL Server Management Studio Express), but when I went
    > to do a query using the query text editor, only two of the tables showed up.
    > Then, mysteriously, the problem went away. Now, it is back.
    >
    > 2 - My insert into a table failed from the debug version in Web Developer,
    > so I copied that SQL call and pasted it into SQL Server Management Program
    > and ran the query. It worked. I then did a select * and only that entry
    > showed up, not all the others. However, from my localhost website, when I
    > do that select all the others show up but not the new one. This tells me
    > that I must be looking at two different databases. The one from the site is
    > the same as the one outlined in Object Explorer, but query window is
    > connected to a different one. Try as I might, I have not been able to get
    > the query window one to attach to the one in Object Explorer. In that app,
    > the one that I want is listed as LAPTOP\SQLEXPRESS(Server 9,0.3042 -
    > LAPTOP\Sheldon) and then the db name. The "other one" is SQL Server
    > Compact Edition [MyComputer\...\thedbname]. In my app, the connection
    > string in the config file is "Data Source=LAPTOP\SQLEXPRESS;Initial
    > Catalog=thedbname;Integrated Security=True"
    > providerName="System.Data..SqlClient"
    >
    > 3 - I still can't figure out why my submit button will not fire an event if
    > the last event was the one fired by that submit button.
    >
    > Please, someone, help me out here.
    >
    > Shelly
    >
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Sep 19, 2007
    #3
  4. Shelly

    Shelly Guest

    OK, here is an update. Can someone please explain this to me?

    I got it down to one database in the Object Explorer. When I then went into
    the query editor, once again only two of the four tables showed up, and if I
    queried one of them I got the wrong data.

    I then went to Object Explorer and right clicked on each of the tables and
    picked the "Script Table As...". Each one produced a query and each query
    worked properly giving the correct data. That is for all four tables. I
    then went back to the Query Editor and now all four tables show up?

    What happened behind the scenes here?

    Oh, I still have the second click on the button problem.

    Shelly


    "Shelly" <> wrote in message
    news:...
    > One more thing: The sql query window indicated that it is using
    > LAPTOP\SQLEXPRESS -- the correct database, the one that I want. Doing a
    > change_connection to that one still results in the same thing. If I do a
    > select * from one of the tables that show up in Object Explorer (other
    > than this one), it gives me "Invalid object name" -- because it doesn't
    > have that table.
    >
    > Could this be a problem with my configuration in that I should only have
    > one or the other? If that is the case, how do I get rid of the Compact
    > Edition? Also, how do I find out where the actual database file is
    > located?
    >
    >
    > "Shelly" <> wrote in message
    > news:...
    >> This ASPX/SqlServer stuff is driving me nuts.
    >>
    >> 1 - In a previous post I said I had four tables and all were showing up
    >> in Object Explorer (MS SQL Server Management Studio Express), but when I
    >> went to do a query using the query text editor, only two of the tables
    >> showed up. Then, mysteriously, the problem went away. Now, it is back.
    >>
    >> 2 - My insert into a table failed from the debug version in Web
    >> Developer, so I copied that SQL call and pasted it into SQL Server
    >> Management Program and ran the query. It worked. I then did a select *
    >> and only that entry showed up, not all the others. However, from my
    >> localhost website, when I do that select all the others show up but not
    >> the new one. This tells me that I must be looking at two different
    >> databases. The one from the site is the same as the one outlined in
    >> Object Explorer, but query window is connected to a different one. Try
    >> as I might, I have not been able to get the query window one to attach to
    >> the one in Object Explorer. In that app, the one that I want is listed
    >> as LAPTOP\SQLEXPRESS(Server 9,0.3042 - LAPTOP\Sheldon) and then the db
    >> name. The "other one" is SQL Server Compact Edition
    >> [MyComputer\...\thedbname]. In my app, the connection string in the
    >> config file is "Data Source=LAPTOP\SQLEXPRESS;Initial
    >> Catalog=thedbname;Integrated Security=True"
    >> providerName="System.Data..SqlClient"
    >>
    >> 3 - I still can't figure out why my submit button will not fire an event
    >> if the last event was the one fired by that submit button.
    >>
    >> Please, someone, help me out here.
    >>
    >> Shelly
    >>

    >
    >
     
    Shelly, Sep 20, 2007
    #4
  5. Shelly

    Shelly Guest

    Now one more. From my code, I couldn't do the insert I wanted. I stopped
    it in the debugger and copied the sql command. I then pasted that sql
    command into the sql window in sql server manager and executed it. It
    worked perfectly. I suspect it has to be a permissions problem. How can I
    find what error was returned in the code from the attempted insert?

    Shelly


    "Shelly" <> wrote in message
    news:...
    > OK, here is an update. Can someone please explain this to me?
    >
    > I got it down to one database in the Object Explorer. When I then went
    > into the query editor, once again only two of the four tables showed up,
    > and if I queried one of them I got the wrong data.
    >
    > I then went to Object Explorer and right clicked on each of the tables and
    > picked the "Script Table As...". Each one produced a query and each query
    > worked properly giving the correct data. That is for all four tables. I
    > then went back to the Query Editor and now all four tables show up?
    >
    > What happened behind the scenes here?
    >
    > Oh, I still have the second click on the button problem.
    >
    > Shelly
    >
    >
    > "Shelly" <> wrote in message
    > news:...
    >> One more thing: The sql query window indicated that it is using
    >> LAPTOP\SQLEXPRESS -- the correct database, the one that I want. Doing a
    >> change_connection to that one still results in the same thing. If I do a
    >> select * from one of the tables that show up in Object Explorer (other
    >> than this one), it gives me "Invalid object name" -- because it doesn't
    >> have that table.
    >>
    >> Could this be a problem with my configuration in that I should only have
    >> one or the other? If that is the case, how do I get rid of the Compact
    >> Edition? Also, how do I find out where the actual database file is
    >> located?
    >>
    >>
    >> "Shelly" <> wrote in message
    >> news:...
    >>> This ASPX/SqlServer stuff is driving me nuts.
    >>>
    >>> 1 - In a previous post I said I had four tables and all were showing up
    >>> in Object Explorer (MS SQL Server Management Studio Express), but when I
    >>> went to do a query using the query text editor, only two of the tables
    >>> showed up. Then, mysteriously, the problem went away. Now, it is back.
    >>>
    >>> 2 - My insert into a table failed from the debug version in Web
    >>> Developer, so I copied that SQL call and pasted it into SQL Server
    >>> Management Program and ran the query. It worked. I then did a select *
    >>> and only that entry showed up, not all the others. However, from my
    >>> localhost website, when I do that select all the others show up but not
    >>> the new one. This tells me that I must be looking at two different
    >>> databases. The one from the site is the same as the one outlined in
    >>> Object Explorer, but query window is connected to a different one. Try
    >>> as I might, I have not been able to get the query window one to attach
    >>> to the one in Object Explorer. In that app, the one that I want is
    >>> listed as LAPTOP\SQLEXPRESS(Server 9,0.3042 - LAPTOP\Sheldon) and then
    >>> the db name. The "other one" is SQL Server Compact Edition
    >>> [MyComputer\...\thedbname]. In my app, the connection string in the
    >>> config file is "Data Source=LAPTOP\SQLEXPRESS;Initial
    >>> Catalog=thedbname;Integrated Security=True"
    >>> providerName="System.Data..SqlClient"
    >>>
    >>> 3 - I still can't figure out why my submit button will not fire an event
    >>> if the last event was the one fired by that submit button.
    >>>
    >>> Please, someone, help me out here.
    >>>
    >>> Shelly
    >>>

    >>
    >>

    >
    >
     
    Shelly, Sep 20, 2007
    #5
  6. Shelly

    Shelly Guest

    I figured it out. In the catch all I had to do was add "e as Exception" and
    then e.ToString() gave me the text. It works now.

    I still have the second click not working.

    Shelly

    "Shelly" <> wrote in message
    news:...
    > Now one more. From my code, I couldn't do the insert I wanted. I stopped
    > it in the debugger and copied the sql command. I then pasted that sql
    > command into the sql window in sql server manager and executed it. It
    > worked perfectly. I suspect it has to be a permissions problem. How can
    > I find what error was returned in the code from the attempted insert?
    >
    > Shelly
    >
    >
    > "Shelly" <> wrote in message
    > news:...
    >> OK, here is an update. Can someone please explain this to me?
    >>
    >> I got it down to one database in the Object Explorer. When I then went
    >> into the query editor, once again only two of the four tables showed up,
    >> and if I queried one of them I got the wrong data.
    >>
    >> I then went to Object Explorer and right clicked on each of the tables
    >> and picked the "Script Table As...". Each one produced a query and each
    >> query worked properly giving the correct data. That is for all four
    >> tables. I then went back to the Query Editor and now all four tables
    >> show up?
    >>
    >> What happened behind the scenes here?
    >>
    >> Oh, I still have the second click on the button problem.
    >>
    >> Shelly
    >>
    >>
    >> "Shelly" <> wrote in message
    >> news:...
    >>> One more thing: The sql query window indicated that it is using
    >>> LAPTOP\SQLEXPRESS -- the correct database, the one that I want. Doing a
    >>> change_connection to that one still results in the same thing. If I do
    >>> a select * from one of the tables that show up in Object Explorer (other
    >>> than this one), it gives me "Invalid object name" -- because it doesn't
    >>> have that table.
    >>>
    >>> Could this be a problem with my configuration in that I should only have
    >>> one or the other? If that is the case, how do I get rid of the Compact
    >>> Edition? Also, how do I find out where the actual database file is
    >>> located?
    >>>
    >>>
    >>> "Shelly" <> wrote in message
    >>> news:...
    >>>> This ASPX/SqlServer stuff is driving me nuts.
    >>>>
    >>>> 1 - In a previous post I said I had four tables and all were showing up
    >>>> in Object Explorer (MS SQL Server Management Studio Express), but when
    >>>> I went to do a query using the query text editor, only two of the
    >>>> tables showed up. Then, mysteriously, the problem went away. Now, it
    >>>> is back.
    >>>>
    >>>> 2 - My insert into a table failed from the debug version in Web
    >>>> Developer, so I copied that SQL call and pasted it into SQL Server
    >>>> Management Program and ran the query. It worked. I then did a select
    >>>> * and only that entry showed up, not all the others. However, from my
    >>>> localhost website, when I do that select all the others show up but not
    >>>> the new one. This tells me that I must be looking at two different
    >>>> databases. The one from the site is the same as the one outlined in
    >>>> Object Explorer, but query window is connected to a different one. Try
    >>>> as I might, I have not been able to get the query window one to attach
    >>>> to the one in Object Explorer. In that app, the one that I want is
    >>>> listed as LAPTOP\SQLEXPRESS(Server 9,0.3042 - LAPTOP\Sheldon) and then
    >>>> the db name. The "other one" is SQL Server Compact Edition
    >>>> [MyComputer\...\thedbname]. In my app, the connection string in the
    >>>> config file is "Data Source=LAPTOP\SQLEXPRESS;Initial
    >>>> Catalog=thedbname;Integrated Security=True"
    >>>> providerName="System.Data..SqlClient"
    >>>>
    >>>> 3 - I still can't figure out why my submit button will not fire an
    >>>> event if the last event was the one fired by that submit button.
    >>>>
    >>>> Please, someone, help me out here.
    >>>>
    >>>> Shelly
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Shelly, Sep 20, 2007
    #6
    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. Kathy Burke
    Replies:
    6
    Views:
    633
    Munsifali Rashid
    Aug 13, 2003
  2. sourabh

    Going nuts with Viewstate

    sourabh, May 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    328
    Scott Mitchell [MVP]
    May 19, 2004
  3. Johnny Emde

    Going nuts - Configuration Error

    Johnny Emde, Sep 24, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    525
    Johnny Emde
    Sep 29, 2005
  4. bigbinc

    Going, nuts 2 printwriters?

    bigbinc, Dec 18, 2003, in forum: Java
    Replies:
    2
    Views:
    349
    Jared Dykstra
    Dec 18, 2003
  5. Sharon McCarty

    Going nuts with permissions and webservices!!!

    Sharon McCarty, Aug 12, 2004, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    128
    Sharon McCarty
    Aug 13, 2004
Loading...

Share This Page