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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. dbserverenum

dbserverenum

Scheduled Pinned Locked Moved C / C++ / MFC
databasesql-serversysadmindebuggingquestion
8 Posts 3 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.
  • H Offline
    H Offline
    halblonious
    wrote on last edited by
    #1

    I'm trying to use this function, but my debugger doesn't recognize it. Is there something I need to define or add to my stdafx? Or, is there a better way to find out the name of the SQL server if it isn't local? halblonious

    L D 2 Replies Last reply
    0
    • H halblonious

      I'm trying to use this function, but my debugger doesn't recognize it. Is there something I need to define or add to my stdafx? Or, is there a better way to find out the name of the SQL server if it isn't local? halblonious

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      halblonious wrote: Or, is there a better way to find out the name of the SQL server if it isn't local? ummmmm i think u have to write code to do that ... ive not heard of such a debug function?


      "there is no spoon"
      biz stuff   about me

      1 Reply Last reply
      0
      • H halblonious

        I'm trying to use this function, but my debugger doesn't recognize it. Is there something I need to define or add to my stdafx? Or, is there a better way to find out the name of the SQL server if it isn't local? halblonious

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Are you getting a compiler, linker, or runtime error? If it's a compiler error, be sure to include Sqlfront.h and Sqldb.h. If it's a linker error, be sure to link with Ntwdblib.lib.


        "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

        H 1 Reply Last reply
        0
        • D David Crow

          Are you getting a compiler, linker, or runtime error? If it's a compiler error, be sure to include Sqlfront.h and Sqldb.h. If it's a linker error, be sure to link with Ntwdblib.lib.


          "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

          H Offline
          H Offline
          halblonious
          wrote on last edited by
          #4

          Thanks, that did seem to work. The sweet irony is, though, that the Sqlfront.h has a compiler error itself: Compiling... testLibraryDlg.cpp c:\program files\microsoft visual studio\vc98\include\sqlfront.h(126) : error C2146: syntax error : missing ';' before identifier 'LPINT' c:\program files\microsoft visual studio\vc98\include\sqlfront.h(126) : error C2040: 'PTR' : 'int' differs in levels of indirection from 'void *' c:\program files\microsoft visual studio\vc98\include\sqlfront.h(126) : fatal error C1004: unexpected end of file found Error executing cl.exe. I'm trying to use SQLBrowseConnect to connect to an unknown server name now, but I'm having even less luck with that. I cut and pasted the example in the MSDN help, but it's got it's own compile errors. halblonious

          D 1 Reply Last reply
          0
          • H halblonious

            Thanks, that did seem to work. The sweet irony is, though, that the Sqlfront.h has a compiler error itself: Compiling... testLibraryDlg.cpp c:\program files\microsoft visual studio\vc98\include\sqlfront.h(126) : error C2146: syntax error : missing ';' before identifier 'LPINT' c:\program files\microsoft visual studio\vc98\include\sqlfront.h(126) : error C2040: 'PTR' : 'int' differs in levels of indirection from 'void *' c:\program files\microsoft visual studio\vc98\include\sqlfront.h(126) : fatal error C1004: unexpected end of file found Error executing cl.exe. I'm trying to use SQLBrowseConnect to connect to an unknown server name now, but I'm having even less luck with that. I cut and pasted the example in the MSDN help, but it's got it's own compile errors. halblonious

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Try moving #include <sqlfront.h> down a few lines (i.e., so that windows.h is included first).


            "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

            H 1 Reply Last reply
            0
            • D David Crow

              Try moving #include <sqlfront.h> down a few lines (i.e., so that windows.h is included first).


              "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

              H Offline
              H Offline
              halblonious
              wrote on last edited by
              #6

              Thank for responding. Somehow, I got SQLBrowseConnect to work for me, so that serves the purpose I needed. Thanks, though. --Evan halblonious

              D 1 Reply Last reply
              0
              • H halblonious

                Thank for responding. Somehow, I got SQLBrowseConnect to work for me, so that serves the purpose I needed. Thanks, though. --Evan halblonious

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                halblonious wrote: Somehow... You don't remember what you did to squelch the errors with sqlfront.h?


                "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

                H 1 Reply Last reply
                0
                • D David Crow

                  halblonious wrote: Somehow... You don't remember what you did to squelch the errors with sqlfront.h?


                  "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

                  H Offline
                  H Offline
                  halblonious
                  wrote on last edited by
                  #8

                  No, I never figured it out. I just gave up and moved on to a different function. It took me a while, but I got SQLBrowseServer to work for me. halblonious

                  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