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. Visual Basic
  4. VB 6 ODBC connection to SQL 2000

VB 6 ODBC connection to SQL 2000

Scheduled Pinned Locked Moved Visual Basic
databasesecurityhelpsql-server
4 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.
  • J Offline
    J Offline
    JumpinJimmy
    wrote on last edited by
    #1

    I have a visual basic 6 application that needs some updating for a project moving from SQL 7 to SQL 2000. The application is an executable that users create shortcuts to on their desktops. The exe file resides on the same server as the sql 2000 database it needs to access. Previously users created an ODBC connection on their own Windows 2000 Professional workstations, and the application that resides on the server used a simple connection string of ... oconn.open "DSN=MOL;UID=sa;" ( yeah I know this is bad, I inherited it this way ) ... but now the server has been upgraded from NT4 to Server 2003, and the database has gone from SQL7 to SQL2000. I have been experimenting blindly with new connection strings, and am currently trying ... oconn.open "Integrated Security=SSPI;Initial Catalog=MOL;Data Source=server_name_here;" The error I get when I run this vb exe on my own workstation with an ODBC connection setup to use SQL authentication (using a user/pass that is setup in SQL) is ... "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Being a newbie to VB and SQL, and given the fact that I inherited this app to try and fix it, I am wondering if this approach is totally wrong? There are roughly 10 users who need to create a shortcut to this VB exe file that resides on the same server as the database, and the appliction is used to make updates to the database. Thanks for any suggestions.

    J 1 Reply Last reply
    0
    • J JumpinJimmy

      I have a visual basic 6 application that needs some updating for a project moving from SQL 7 to SQL 2000. The application is an executable that users create shortcuts to on their desktops. The exe file resides on the same server as the sql 2000 database it needs to access. Previously users created an ODBC connection on their own Windows 2000 Professional workstations, and the application that resides on the server used a simple connection string of ... oconn.open "DSN=MOL;UID=sa;" ( yeah I know this is bad, I inherited it this way ) ... but now the server has been upgraded from NT4 to Server 2003, and the database has gone from SQL7 to SQL2000. I have been experimenting blindly with new connection strings, and am currently trying ... oconn.open "Integrated Security=SSPI;Initial Catalog=MOL;Data Source=server_name_here;" The error I get when I run this vb exe on my own workstation with an ODBC connection setup to use SQL authentication (using a user/pass that is setup in SQL) is ... "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Being a newbie to VB and SQL, and given the fact that I inherited this app to try and fix it, I am wondering if this approach is totally wrong? There are roughly 10 users who need to create a shortcut to this VB exe file that resides on the same server as the database, and the appliction is used to make updates to the database. Thanks for any suggestions.

      J Offline
      J Offline
      jimpar
      wrote on last edited by
      #2

      check here http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSQLServer[^] or here http://www.able-consulting.com/ADO_Conn.htm[^]

      J 1 Reply Last reply
      0
      • J jimpar

        check here http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSQLServer[^] or here http://www.able-consulting.com/ADO_Conn.htm[^]

        J Offline
        J Offline
        JumpinJimmy
        wrote on last edited by
        #3

        I have tried all of the options displayed on these links, and all seem to result with the same error. I am wondering if something with the SQL setup itself is blocking connections? We have turned off the use of Named Pipes in SQL 2000. I have tried with both having my own ODBC connection setup (using SQL authentication and having the user/pass setup that is the db user we need to use), and without any ODBC driver at all on my own desktop. I am kind of out of ideas at this point. Thanks!

        R 1 Reply Last reply
        0
        • J JumpinJimmy

          I have tried all of the options displayed on these links, and all seem to result with the same error. I am wondering if something with the SQL setup itself is blocking connections? We have turned off the use of Named Pipes in SQL 2000. I have tried with both having my own ODBC connection setup (using SQL authentication and having the user/pass setup that is the db user we need to use), and without any ODBC driver at all on my own desktop. I am kind of out of ideas at this point. Thanks!

          R Offline
          R Offline
          RichardGrimmer
          wrote on last edited by
          #4

          Usually ocurrs if using Windows Authentication on the server, and attempting to use SQL authentication to get in.... Win Auth uses Domain login, whereas SQL uses uid/pwd - are you SURE you're using mixed mode authentication? "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox

          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