Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. I Think I May Go Back To MS Access

I Think I May Go Back To MS Access

Scheduled Pinned Locked Moved Database
databasecsharpsql-serversysadminjson
12 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Mycroft Holmes

    I'd be inclined to think i i your connection, you don't mention testing a connection from your new app to another database. Next check the credentials you are using have the right permissions, I give my app credentials dbo rights to the database. It's embarrassing the number of times I have to stand back and scratch the head when setting up a new app, it got so bad I set up a shell application with all the needed bits in place and just rename the name space and database when I want to start a new project.

    Never underestimate the power of human stupidity RAH

    R Offline
    R Offline
    Roger Wright
    wrote on last edited by
    #3

    Actually, I tested the connection to all the other databases on the server; they all worked fine. And I do have dbo rights on all of them, including the new one. I'm wondering if something non-obvious went wrong when I created the database on the server. There were no error messages, but 'stuff' happens. Perhaps the best bet is to delete it and recreate it. It's a little one, with just two tables. Frustrating... :doh:

    "A Journey of a Thousand Rest Stops Begins with a Single Movement"

    1 Reply Last reply
    0
    • R Roger Wright

      At least it worked, though badly. For months I've been playing with SQL Server Express 2008 on my server, building databases and connecting to them just to see what happens when I try different things. To be honest, I haven't learned much, since my time is so limited, but it's been fun. Last night I created a new DB with the intent of banging out a tool to use at work for tracking some measurements I have to record. I can add functionality later, but I thought I'd at least get the measurements saved for now. Building the DB in the management console was a breeze, though tedious, but when I switched back to the client computer, created a skeleton app in C#, and tried to add the DB connection, it all fell apart. It's telling me that the database doesn't exist, or I don't have permission to open it. That's all - no other clues. Yet from the same app and computer, if I try to connect to one of the other DBs I have on the same instance of SQL Server 2008, I get no errors at all. That tells me that SQL ServerX is configured correctly, ie, Remote Connections enabled, TCP/IP enabled and using port 1433, else I'd get the same error from all the other DBs installed. That also implies that the permissions are correct, as I built them all using the same user account, in the same way. What the heck am I missing here? Nothing on Google or MSDN has helped, not even a clue. Was there a checkbox I missed when creating this new DB that I missed, something that says "Publish this database in the Browser Service?" I don't recall seeing anything like that. The only change that I've noted is that, since I created the other DBs on the server, several times the Windows Update service has run automatically. Did anything from Microsoft recently change the way SQL Server works? If so, there's no documentation I can find... Any ideas? Should I just delete the DB and start over? I hate it when I'm all fired up with an idea, motivation at top levels, ready to build something useful, then some crap like this lets all the wind out of my sails. :(( I've wasted two precious nights on this nonsense, and might not have that luxury again for weeks!

      "A Journey of a Thousand Rest Stops Begins with a Single Movement"

      G Offline
      G Offline
      Gonzoox
      wrote on last edited by
      #4

      Check the DB security, I don't have a SQL Server on hand right now to check where, but in the management console go to the database, then security and see who has access to it, also at server level check the DB assignments to each security group. The problem is not related to your app, is in the database security for sure

      I want to die like my grandfather- asleep, not like the passengers in his car, screaming!

      R 1 Reply Last reply
      0
      • G Gonzoox

        Check the DB security, I don't have a SQL Server on hand right now to check where, but in the management console go to the database, then security and see who has access to it, also at server level check the DB assignments to each security group. The problem is not related to your app, is in the database security for sure

        I want to die like my grandfather- asleep, not like the passengers in his car, screaming!

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #5

        I'll do that. It makes sense, in a twisty, Microsoftian way. Since all the DBs were created with the same tool, using the same settings, they should behave identically. But prior to this last one there was an automatic Windows Update. That may have changed some of the default settings in SQL Server. If not, I'm bolluxed; nothing else has changed.

        "A Journey of a Thousand Rest Stops Begins with a Single Movement"

        1 Reply Last reply
        0
        • R Roger Wright

          At least it worked, though badly. For months I've been playing with SQL Server Express 2008 on my server, building databases and connecting to them just to see what happens when I try different things. To be honest, I haven't learned much, since my time is so limited, but it's been fun. Last night I created a new DB with the intent of banging out a tool to use at work for tracking some measurements I have to record. I can add functionality later, but I thought I'd at least get the measurements saved for now. Building the DB in the management console was a breeze, though tedious, but when I switched back to the client computer, created a skeleton app in C#, and tried to add the DB connection, it all fell apart. It's telling me that the database doesn't exist, or I don't have permission to open it. That's all - no other clues. Yet from the same app and computer, if I try to connect to one of the other DBs I have on the same instance of SQL Server 2008, I get no errors at all. That tells me that SQL ServerX is configured correctly, ie, Remote Connections enabled, TCP/IP enabled and using port 1433, else I'd get the same error from all the other DBs installed. That also implies that the permissions are correct, as I built them all using the same user account, in the same way. What the heck am I missing here? Nothing on Google or MSDN has helped, not even a clue. Was there a checkbox I missed when creating this new DB that I missed, something that says "Publish this database in the Browser Service?" I don't recall seeing anything like that. The only change that I've noted is that, since I created the other DBs on the server, several times the Windows Update service has run automatically. Did anything from Microsoft recently change the way SQL Server works? If so, there's no documentation I can find... Any ideas? Should I just delete the DB and start over? I hate it when I'm all fired up with an idea, motivation at top levels, ready to build something useful, then some crap like this lets all the wind out of my sails. :(( I've wasted two precious nights on this nonsense, and might not have that luxury again for weeks!

          "A Journey of a Thousand Rest Stops Begins with a Single Movement"

          R Offline
          R Offline
          Roger Wright
          wrote on last edited by
          #6

          At least a partial solution... When creating the database in Management Studio, I used the user name RAWRIGHT\Administrator as the owner. But while reviewing the error logs I found many entries corresponding to my attempts to connect locally reporting a logon failure for RAWRIGHT\rawright. Apparently it considered me connecting from the client PC to be a different user than the local one, which makes sense. What doesn't make sense is that the other DBs on the server don't care what login I use. I still haven't solved that mystery. But for now, I added the RAWRIGHT\rawright user name to the list of LOGIN objects on the server and I can now connect using the Add Database wizard in Visual Studio. I'm still mystified about why the other DBs work fine, while this one has been a nightmare, but at least I can get on with the project. If anyone has an explanation I'd appreciate hearing it. MSDN and Microsoft Support have apparently never heard that there's a problem, based on the results from Bing. :laugh:

          "A Journey of a Thousand Rest Stops Begins with a Single Movement"

          L 1 Reply Last reply
          0
          • R Roger Wright

            At least a partial solution... When creating the database in Management Studio, I used the user name RAWRIGHT\Administrator as the owner. But while reviewing the error logs I found many entries corresponding to my attempts to connect locally reporting a logon failure for RAWRIGHT\rawright. Apparently it considered me connecting from the client PC to be a different user than the local one, which makes sense. What doesn't make sense is that the other DBs on the server don't care what login I use. I still haven't solved that mystery. But for now, I added the RAWRIGHT\rawright user name to the list of LOGIN objects on the server and I can now connect using the Add Database wizard in Visual Studio. I'm still mystified about why the other DBs work fine, while this one has been a nightmare, but at least I can get on with the project. If anyone has an explanation I'd appreciate hearing it. MSDN and Microsoft Support have apparently never heard that there's a problem, based on the results from Bing. :laugh:

            "A Journey of a Thousand Rest Stops Begins with a Single Movement"

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #7

            Roger Wright wrote:

            MSDN and Microsoft Support have apparently never heard that there's a problem, based on the results from Bing.

            Did you ever consider the possibility of Bing being a bit subjective when looking for MS problems? :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            Getting an article published on CodeProject should be easier and faster for Bronze and Silver authors.


            R 1 Reply Last reply
            0
            • L Luc Pattyn

              Roger Wright wrote:

              MSDN and Microsoft Support have apparently never heard that there's a problem, based on the results from Bing.

              Did you ever consider the possibility of Bing being a bit subjective when looking for MS problems? :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


              Getting an article published on CodeProject should be easier and faster for Bronze and Silver authors.


              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #8

              That thought had crossed my mind. I also considered the possibility that Bing is just as useless as the old MSDN Search, but of course discarded that train of thought as unworthy. ;P And I posted too soon. Having spent an hour recreating the database, all the tables, and a diagram with a username that works, I returned to Visual Studio and added the connection successfully. Unfortunately, the wizard connects nicely, but reports that the database contains no tables (nor anything else). Thanks a bunch Microsoft, for a week of fun-filled long evenings... X|

              "A Journey of a Thousand Rest Stops Begins with a Single Movement"

              L 1 Reply Last reply
              0
              • R Roger Wright

                That thought had crossed my mind. I also considered the possibility that Bing is just as useless as the old MSDN Search, but of course discarded that train of thought as unworthy. ;P And I posted too soon. Having spent an hour recreating the database, all the tables, and a diagram with a username that works, I returned to Visual Studio and added the connection successfully. Unfortunately, the wizard connects nicely, but reports that the database contains no tables (nor anything else). Thanks a bunch Microsoft, for a week of fun-filled long evenings... X|

                "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #9

                Then it is time to modify your subject line again. :omg:

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                Getting an article published on CodeProject should be easier and faster for Bronze and Silver authors.


                R 1 Reply Last reply
                0
                • L Luc Pattyn

                  Then it is time to modify your subject line again. :omg:

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                  Getting an article published on CodeProject should be easier and faster for Bronze and Silver authors.


                  R Offline
                  R Offline
                  Roger Wright
                  wrote on last edited by
                  #10

                  It gets better. I had to go back to the server and click on Properties for each table, then individually select every Permission I want to have associated with my username. Talk about tedious! There's about a dozen permissions associated with each table. Surely there must be a simpler way! But now I can at least see the tables and their columns in Visual Studio; I have yet to discover whether I can actually access them in code. I've never had much luck making the drag and drop method of creating data bindings before - I'm obviously missing something there, since no one else seems to bitch about it as much as I do. But that task is better left for another day... Progress, however miniscule, is not to be scoffed at, nor pushed too far. It's late, and time for a nap before I really mess something up.

                  "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                  M 1 Reply Last reply
                  0
                  • R Roger Wright

                    It gets better. I had to go back to the server and click on Properties for each table, then individually select every Permission I want to have associated with my username. Talk about tedious! There's about a dozen permissions associated with each table. Surely there must be a simpler way! But now I can at least see the tables and their columns in Visual Studio; I have yet to discover whether I can actually access them in code. I've never had much luck making the drag and drop method of creating data bindings before - I'm obviously missing something there, since no one else seems to bitch about it as much as I do. But that task is better left for another day... Progress, however miniscule, is not to be scoffed at, nor pushed too far. It's late, and time for a nap before I really mess something up.

                    "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                    M Offline
                    M Offline
                    Mycroft Holmes
                    wrote on last edited by
                    #11

                    Go back to the server in SSMS, create another SQL ID in the server security, don't assign anything to the id. Go the the database security and add the user, in the users permissions (where is has public checked) check dbo. Now test the id by making another connection in SSMS using the new ids creds, make sure you can sees all the tables in the DB etc

                    Never underestimate the power of human stupidity RAH

                    1 Reply Last reply
                    0
                    • R Roger Wright

                      At least it worked, though badly. For months I've been playing with SQL Server Express 2008 on my server, building databases and connecting to them just to see what happens when I try different things. To be honest, I haven't learned much, since my time is so limited, but it's been fun. Last night I created a new DB with the intent of banging out a tool to use at work for tracking some measurements I have to record. I can add functionality later, but I thought I'd at least get the measurements saved for now. Building the DB in the management console was a breeze, though tedious, but when I switched back to the client computer, created a skeleton app in C#, and tried to add the DB connection, it all fell apart. It's telling me that the database doesn't exist, or I don't have permission to open it. That's all - no other clues. Yet from the same app and computer, if I try to connect to one of the other DBs I have on the same instance of SQL Server 2008, I get no errors at all. That tells me that SQL ServerX is configured correctly, ie, Remote Connections enabled, TCP/IP enabled and using port 1433, else I'd get the same error from all the other DBs installed. That also implies that the permissions are correct, as I built them all using the same user account, in the same way. What the heck am I missing here? Nothing on Google or MSDN has helped, not even a clue. Was there a checkbox I missed when creating this new DB that I missed, something that says "Publish this database in the Browser Service?" I don't recall seeing anything like that. The only change that I've noted is that, since I created the other DBs on the server, several times the Windows Update service has run automatically. Did anything from Microsoft recently change the way SQL Server works? If so, there's no documentation I can find... Any ideas? Should I just delete the DB and start over? I hate it when I'm all fired up with an idea, motivation at top levels, ready to build something useful, then some crap like this lets all the wind out of my sails. :(( I've wasted two precious nights on this nonsense, and might not have that luxury again for weeks!

                      "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                      P Offline
                      P Offline
                      PIEBALDconsult
                      wrote on last edited by
                      #12

                      I'm only 300 miles away... :-D

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups