?
Solved

SQL Server Error

Posted on 2002-04-26
7
Medium Priority
?
1,004 Views
Last Modified: 2007-11-27
Run - time '2147467259(080004005)';
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied

Secondly how do I change the server name from
SAICRESCENT\SQLSVRINSTANCE  to a single name


When I check the SQL SERVICE Manager I find the server name  as SAICRESCENT\SQLSVRINSTANCE and so in the code I am giving like below.  I had given  full permissions to Administrator .


Private Sub Command1_Click()
Option Explicit

Dim oConn As ADODB.Connection
Dim oRs As ADODB.Recordset

Private Sub Form_Load()

 Set oConn = New ADODB.Connection

 With oConn
     .Provider = "SQLOLEDB"
     .ConnectionString = "Server=\\SAICRESCENT\SQLSVRINSTANCE;UID= Administrator;Pwd=;Database=PUBS;"
     .Open
 End With
 sSQL = "SELECT * FROM JOBS"
 oRs.Open sSQL, oConn, adOpenForwardOnly, adLockReadOnly
End Sub
0
Comment
Question by:Richards
[X]
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
7 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6974555
Try this:
With oConn
    .Provider = "SQLOLEDB"
    .ConnectionString = "Server=SAICRESCENT\SQLSVRINSTANCE;UID= Administrator;Pwd=;Database=PUBS;"
    .Open
End With

CHeers
0
 

Author Comment

by:Richards
ID: 6978090
Thanks ! Angel . Now I am getting this error
Runt-time '-2147467259 (80004005)' :
Login failed for user 'sa'. Reason : Not
associated  with a trusted SQL Server Connection
I had given all the access to this user
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6979697
try those:
-- connect using the NT account (which must be accepted by SQL Server by either defining either the NT account itself or one of the NT groups the NT account belongs to)
With oConn
   .Provider = "SQLOLEDB"
   .ConnectionString = "Server=SAICRESCENT\SQLSVRINSTANCE;Integrated Security=SSIP;"
   .Open
End With

-- use the SA login explicitely
With oConn
   .Provider = "SQLOLEDB"
   .ConnectionString = "Server=SAICRESCENT\SQLSVRINSTANCE;UID=sa;Pwd=;Database=PUBS;"
   .Open
End With

CHeers
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Richards
ID: 6981360
Hi Angel

Thanks !

When I try the first one I am getting this error
Run-Time error '-2147217887 (80040e21)' :
Multiple-step OLE DB operation generated errors. Check each OLE DB status value , if available . No work was
done

When I try the sa expliclty it is giving this error
Run time error '-214721843(80040e4d)';
Login failed for user 'sa'
0
 
LVL 2

Expert Comment

by:Chicko
ID: 7104340
Richards,

Most of your questions can be answered on the ms technet site, simply search on the error number you are getting and let technet do the rest.

http://www.microsoft.com/technet

Hope this helps

Regards
Chicko
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7265687

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7296574
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

764 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