Solved

SQL Server Error

Posted on 2002-04-26
7
990 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
7 Comments
 
LVL 142

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 142

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Do Functions perform better than dynamic (inline) SQL in PostgreSQL? 3 101
C# Application Local DB Connection String 23 108
Slow SQL query 12 55
Online Forms 6 52
Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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…

911 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

27 Experts available now in Live!

Get 1:1 Help Now