Solved

Needs help in connection

Posted on 2007-03-21
3
176 Views
Last Modified: 2010-04-30
Hi: Can any one please tell me what i did mistake in the connection string
Thanks.

Dim j, vArr, rs As DAO.Recordset, nLine
Dim DBConn
Dim rs
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=SQLOLEDB; Data Source=KMS0062K\DEVELOPMENT; Initial Catalog=mgt_Admin; User ID=sa"
Dim sSQL As String

Set rs = CurrentDb.OpenRecordset("tblInfo")
0
Comment
Question by:mustish1
[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
  • 2
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18766584
apart from the sapced thatI would not put in there, and the missing password part, there seems nothing wrong:

cn.Open "Provider=SQLOLEDB;Data Source=KMS0062K\DEVELOPMENT;Initial Catalog=mgt_Admin;User ID=sa;PWD=;"
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18766586
ps: AVOID using sa for applications !!!!
0
 
LVL 10

Expert Comment

by:Clif
ID: 18766598
Aside from (possibly) a password, I couldn't say without more information.

What error(s) do you get?

You might find more information on connection strings here:
http://www.connectionstrings.com/
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

705 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