Solved

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

Posted on 2009-04-03
6
195 Views
Last Modified: 2013-11-27
Hello,
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;"

 conn.Open

 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

0
Comment
Question by:ScottBlake
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

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

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

Author Comment

by:ScottBlake
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
screenshot.doc
0
 
LVL 12

Accepted Solution

by:
udayakumarlm earned 500 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
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:ScottBlake
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?
0
 

Author Closing Comment

by:ScottBlake
ID: 31566311
the user id worked.  thanks
0
 
LVL 12

Expert Comment

by:udayakumarlm
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
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now