?
Solved

Needs help in connection

Posted on 2007-03-21
3
Medium Priority
?
183 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
  • 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This video teaches viewers about errors in exception handling.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses
Course of the Month16 days, 22 hours left to enroll

864 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