Solved

SQL Server Error

Posted on 2002-04-26
7
996 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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 technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

689 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