Do I need to change my ADO connection string if I upgrade from SQL 2000 to SQL 2005?

Posted on 2009-04-03
Medium Priority
Last Modified: 2013-11-27
I am trying to upgrade my server from SQL 2000 to SQL 2003 and am having some trouble with an application that talks to the SQL server from Access 2003 using VBA code.  The code works fine on the 2000 server, but I am getting login errors when I use it on the 2005 server.  Is it as simple as changing a connection string?  I have tried a few, but have not had any success.  Here is a snippet of the code - I hope someone can help!  I get the error at the conn.Open command.  Thank you!
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=sqloledb;Data Source=datacruncher;" &_ 
                                      "Initial Catalog=mmcsdb;Integrated Security=SSPI;"
 strInitial = Form_frmInitialize.cboOrdProd.Column(1)
 strsql = "if exists (select * from sysobjects " & _
        "where name = 'vwomit" & strInitial & "') " & _
        "drop view vwomit" & strInitial & ""
conn.Execute strsql

Open in new window

Question by:ScottBlake
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 12

Expert Comment

by:udaya kumar laligondla
ID: 24061470
try using
conn.ConnectionString = "Provider=sqloledb;Data Source=datacruncher,1433;" &_
                                      "Initial Catalog=mmcsdb;Integrated Security=SSPI;"

replace 1433 with the Port of SQL server. if you are still getting the error post the error message or screen shot

Author Comment

ID: 24061640
Thanks, but I got the same error.  We use the default port of 1433, so I was not optimistic.  I know it is connecting to the server because I also see a login error in the SQL Server logs.  Here is a screen shot
LVL 12

Accepted Solution

udaya kumar laligondla earned 1500 total points
ID: 24061688
try using a server login(using username and password) and check if you are able to connect. it looks like the login is failing
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 24061839
I would prefer not to setup logins.  Is there a security setting that is turned off by default in SQL 2000 but turned on by default in SQL 2005?

Author Closing Comment

ID: 31566311
the user id worked.  thanks
LVL 12

Expert Comment

by:udaya kumar laligondla
ID: 24062024
you need to grant access rights to the database. if possible from the client machine try to connect to the SQL server using other application or SQL Server Management studio. check if you can access the database mmcsdb.
if the other application is not working then the login that you used to log in to the machine does not have rights to the server

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question